182void useLogFile(
const char* aFileName =
"gvxr.log");
184void displayBeam(
bool aState =
true);
185void displayDetector(
bool aState =
true);
186void displayNormalVectors(
bool aState =
true);
187void useWireframe(
bool aState =
true);
188void useLighing(
bool aState =
true);
189void useNegative(
bool aState =
true);
232void perspective(
double fovy,
double aspect,
double zNear,
double zFar);
328 const std::string& aUnitOfLength);
371 const std::string& aUnitOfLength);
478 const std::string& aUnitOfLength);
515 const std::string& aUnitOfEnergy);
538 const std::string& aFileName,
539 const std::string& aUnitOfLength,
540 bool addToRendererAsInnerSurface =
true);
561 const std::string& aUnitOfLength);
583 const std::string& aParent =
"root");
607 double aLength = 1.0,
608 const std::string& aUnitOfLength =
"cm",
609 const std::string& aParent =
"root");
635 unsigned int aNumberOfSectors = 10,
636 double aHeight = 1.0,
637 double aRadius = 0.5,
638 const std::string& aUnitOfLength =
"cm",
639 const std::string& aParent =
"root");
671 const std::vector<short>& aVoxelDataSet,
673 unsigned int aHeight,
678 const std::string& aUnitOfLength =
"cm",
679 const std::string& aParent =
"root");
682void makeTriangularMesh(
const std::string& aLabel,
683 const std::vector<float>& aVertexSet,
684 const std::string& aUnitOfLength =
"cm",
685 const std::string& aParent =
"root");
688void makeTriangularMesh(
const std::string& aLabel,
689 const std::vector<float>& aVertexSet,
690 const std::vector<int>& aTriangleIndexSet,
691 const std::string& aUnitOfLength =
"cm",
692 const std::string& aParent =
"root");
705void addMesh(
const std::string& aDestination,
const std::string& aSource);
718void subtractMesh(
const std::string& aDestination,
const std::string& aSource);
762 const std::vector<double>& aMatrix);
795 const std::string& aUnitOfLength =
"cm");
818 const std::string& aUnitOfLength =
"cm");
849void setColor(
const std::string& aLabel,
float R,
float G,
float B,
float A);
862void setColour(
const std::string& aLabel,
float R,
float G,
float B,
float A);
1020 const std::string& aUnitOfLength);
1082void scaleScene(
double x,
double y,
double z,
const std::string& aUnitOfLength);
1120 const std::string& aUnitOfLength);
1149 const std::string& aLabel);
1160 const std::string& aLabel);
1170 const std::vector<std::vector<float> >& aMatrix);
1180 const std::vector<std::vector<float> >& aMatrix);
1191 const std::string& aLabel,
1192 const std::vector<std::vector<float> >& aMatrix);
1203void setHU(
const std::string& aLabel,
short HU);
1247void setElement(
const std::string& aLabel,
const std::string& aName);
1260void setMixture(
const std::string& aLabel,
const std::string& aMixture);
1273 const std::vector<int>& aZNumberSet,
1274 const std::vector<double>& aWeightSet);
1287void setCompound(
const std::string& aLabel,
const std::string& aCompound);
1303 double aCoefficient,
1304 const std::string& aUnit);
1319 double aCoefficient,
1320 const std::string& aUnit);
1335 double aCoefficient,
1336 const std::string& aUnit);
1351 const std::string& aUnit);
1382 const std::string& aUnitOfEnergy);
1402 const std::string& aUnitOfEnergy);
1428 int aRendererMajorVersion = 3,
1429 int aRendererMinorVersion = 2);
1449 int aVisibilityFlag = 0,
1450 const std::string& aRenderer =
"OPENGL",
1451 int aRendererMajorVersion = 3,
1452 int aRendererMinorVersion = 2);
1542 int aViewportHeight);
1556void setZoom(
float aZoomValue);
1562void setSceneRotationMatrix(
const std::vector<double>& aRotationMatrix);
1565std::vector<double> getSceneRotationMatrix();
1627const std::vector<std::vector<std::vector< float> > >&
takeScreenshot(
int aWindowID = -1);
1711 const std::string& aUnitOfEnergy,
1712 double aNumberOfPhotons);
1728 const std::string& aUnitOfEnergy,
1729 double aNumberOfPhotons);
1746 const std::string& aUnitOfEnergy,
1747 bool aNormalisationFlag);
1793 const std::string& aFileName = std::string());
1807 bool useCompression =
true);
1821 bool useCompression =
true);
1835 bool useCompression =
true);
1849 bool useCompression =
true);
1863 bool useCompression =
true);
2010 const std::string& aUnitOfLength,
2011 unsigned int aNumberOfAngle,
2012 double anAngleOffset);
2051 const std::string& aUnitOfLength,
2052 unsigned int aNumberOfAngle,
2053 double anAngleOffset);
2120std::vector<float>
getImageRow(
const std::vector<std::vector<float> >& anImage,
2199 const std::string& aUnitOfEnergy);
2217 const std::string& aUnitOfEnergy);
2234 const std::string& aUnitOfEnergy);
2254 const std::string& aUnitOfEnergy);
2274 const std::string& aUnitOfEnergy);
2290 const std::string& aUnitOfEnergy);
2292std::vector<std::vector<std::vector< float> > > convertHU2mu(
const std::vector<std::vector<std::vector< float> > >& anImage,
2294 const std::string& aUnitOfEnergy);
2304 double aRayOriginX,
double aRayOriginY,
double aRayOriginZ,
2305 double aRayDirectionX,
double aRayDirectionY,
double aRayDirectionZ);
2308std::vector<std::vector<float> > loadImage2D(
const std::string& aFileName);
2310std::vector<std::vector<std::vector<float> > > loadImage3D(
const std::string& aFileName);
2312double computeZNCC(
const std::vector<std::vector<std::vector<float> > >& aReferenceImage,
const std::vector<std::vector<std::vector<float> > >& aTestImage);
2313double computeRMSE(
const std::vector<std::vector<std::vector<float> > >& aReferenceImage,
const std::vector<std::vector<std::vector<float> > >& aTestImage);
2315double getMean(
const std::vector<float>& anImage);
2316double getStddev(
const std::vector<float>& anImage);
2318double computeZNCC(
const std::vector<float>& aReferenceImage,
const std::vector<float>& aTestImage);
2319double computeRMSE(
const std::vector<float>& aReferenceImage,
const std::vector<float>& aTestImage,
bool normalise =
false);
2321double computeRMSE(
bool normalise =
false);
2322double computeZNCC();
2323void loadReference(
const std::vector<float>& aReferenceImage);
2324void loadTest(
const std::vector<float>& aTestImage);
2325void lineariseTest(
float aThreshold,
float aScalingFactor);
2327float getMinValue(
const std::vector<std::vector<std::vector<float> > >& aImage);
2328float getMaxValue(
const std::vector<std::vector<std::vector<float> > >& aImage);
void clearDetectorEnergyResponse()
Clear the energy response of the detector.
void useParallelBeam()
Use a parallel source (e.g. to mimic a source that is extremely far from the scanned object and detec...
void setDensity(const std::string &aLabel, double aDensity, const std::string &aUnit)
Set the density corresponding to the material properties of a polygon mesh.
void popModelViewMatrix()
Restore the matrix from the model/view matrix stack, and remove the last matrix of the stack....
void setNodeTransformationMatrix(const std::string &aLabel, const std::vector< std::vector< float > > &aMatrix)
Set the transformation matrix of a given node.
void saveLastProjectionSet(const std::string &aFileName=std::string(), bool useCompression=true)
Save the last projection set that has been computed.
void createOpenGLContext(int aWindowID=-1, int aRendererMajorVersion=3, int aRendererMinorVersion=2)
Create an OpenGL context (the window won't be shown).
void displayNode(const std::string &aLabel)
Display the scenegraph node using OpenGL.
std::vector< double > getNodeOnlyBoundingBox(const std::string &aLabel, const std::string &aUnitOfLength="cm")
Access the bounding box of a given node (without its children). The bounding box is given in the worl...
std::string getOpenGlVersion()
Accessor on the OpenGL version.
int getMajorVersionOfSimpleGVXR()
Accessor on the major version of SimpleGVXR. This number is changed when incompatible API changes hav...
double getMassAttenuationFromElement(const std::string &anElement, double anEnergy, const std::string &aUnitOfEnergy)
Accessor on the chemical element's mass attenuation.
void addPolygonMeshAsInnerSurface(const std::string &aLabel)
Add a polygon mesh, given its label, to the X-ray renderer as an inner surface.
std::vector< double > getSourcePosition(const std::string &aUnitOfLength)
Accessor on the position of the X-ray source.
void shearNode(const std::string &aLabel, double yx, double zx, double xy, double zy, double xz, double yz)
Use a shear matrix to transform the node.
void setMonoChromatic(double anEnergy, const std::string &aUnitOfEnergy, double aNumberOfPhotons)
Use a monochromatic beam spectrum (i.e. one single energy).
std::string getElementSymbol(unsigned short Z)
Accessor on the chemical element' symbol depending on its Z number.
void loadSpectrumFromTSV(const std::string &aFileName, const std::string &aUnitOfEnergy, bool aNormalisationFlag)
Load the incident beam energy spectrum from a TSV file.
std::vector< std::vector< std::vector< float > > > getLastProjectionSet()
Accessor on the last projection set that has been computed.
std::string getChildLabel(const std::string &aLabel, unsigned int i)
Accessor on the i-th child's label in the list of children of a given node in the scenegraph.
void setRootTransformationMatrix(const std::vector< std::vector< float > > &aMatrix)
Set the transformation matrix of the scengraph's root node.
void setWindowBackGroundColour(float R, float G, float B, int aWindowID=-1)
Set window background colour.
void translateNode(const std::string &aLabel, double x, double y, double z, const std::string &aUnitOfLength)
Translate a polygon mesh.
double getUnitOfEnergy(const std::string &aUnitOfEnergy)
Accessor on the numerical value corresponding to a unit of energy.
void loadMeshFile(const std::string &aLabel, const std::string &aFileName, const std::string &aUnitOfLength, bool addToRendererAsInnerSurface=true)
Load a polygon mesh from a file, set its label in the scenegraph (i.e. identifier) and add it to the ...
int getImageWidth(const std::vector< std::vector< float > > &anImage)
Accessor on the width of a given image.
void saveLastLBuffer(const std::string &aFileName=std::string(), bool useCompression=true)
Save the last L-buffer that has been computed.
std::vector< std::vector< std::vector< float > > > computeProjectionSet(double x, double y, double z, const std::string &aUnitOfLength, unsigned int aNumberOfAngle, double anAngleOffset)
Compute the projection set corresponding to the environment that has previously been set,...
void startArcBallRotation(double x, double y)
Call this function when the user starts an arc-ball rotation (e.g. left-mouse button click in the 3-D...
std::vector< double > getDetectorSize(const std::string &aUnitOfLength)
Accessor on the size of the X-ray detector.
std::vector< float > getAmbientColour(const std::string &aLabel)
Accessor on the ambient colour of the material of a given polygon mesh.
void saveLastXRayImage(const std::string &aFileName=std::string(), bool useCompression=true)
Save the last X-ray image that has been computed.
std::string getOpenGlRenderer()
Accessor on the OpenGL renderer.
std::vector< std::vector< float > > getLastXRayImage()
Accessor on the last X-ray image that has been computed.
void destroyWindow(int aWindowID=-1)
Close and destroy a given window or OpenGL context.
void rotateNode(const std::string &aLabel, double anAngle, double x, double y, double z)
Rotate a polygon mesh.
double getMuFromHU(double HU, double anEnergy, const std::string &aUnitOfEnergy)
Accessor on the HU's linear attenuation coefficient.
double getDensity(const std::string &aLabel)
Accessor on the density corresponding to the material properties of a polygon mesh.
std::vector< double > getDetectorUpVector()
Accessor on the up-vector defining the orientation of the X-ray detector.
void hideWindow(int aWindowID=-1)
Hide a window.
int getImageHeght(const std::vector< std::vector< float > > &anImage)
Accessor on the height of a given image.
void setLinearAttenuationCoefficient(const std::string &aLabel, double aCoefficient, const std::string &aUnit)
Set the linear attenuation coefficient corresponding to the material properties of a polygon mesh.
void rotateModelView(double anAngle, double x, double y, double z)
Restore the matrix from the model/view matrix stack, and remove the last matrix of the stack....
int getPatchVersionOfSimpleGVXR()
Accessor on the minor version of SimpleGVXR. This number is changed when bug fixes have been added in...
void setWindowSize(int aWidth, int aHeight, int aWindowID=-1)
Create an OpenGL context and display it in a window.
void translateScene(double x, double y, double z, const std::string &aUnitOfLength)
Translate the 3-D scene (all the polygon meshes will be affected but not modified).
int getOversamplingFactor()
Accessor on the multiplicative factor to oversample the L-buffers.
double getMassAttenuationFromCompound(const std::string &aCompound, double anEnergy, const std::string &aUnitOfEnergy)
Accessor on the compound's mass attenuation.
std::vector< double > getEnergyBins(const std::string &aUnitOfEnergy)
Accessor on the energy bins of the beam spectrum.
std::vector< double > getPhotonCountEnergyBins()
Accessor on the number of photons per energy bin of the beam spectrum.
std::string getElementName(unsigned short Z)
Accessor on the chemical element's name depending on its Z number.
std::vector< double > getDetectorRightVector()
Accessor on the right-vector defining the orientation of the X-ray detector.
void enableArtifactFilteringOnGPU(void)
Enable artefact filtering on GPU (it is fast but can be inaccurate).
void saveLastCumulatedLBuffer(const std::string &aFileName=std::string(), bool useCompression=true)
Save the last cumulated L-buffer that has been computed.
void makeCube(const std::string &aLabel, double aLength=1.0, const std::string &aUnitOfLength="cm", const std::string &aParent="root")
Create a cube, centred on (0, 0, 0) and set its label in the scenegraph (i.e. identifier)....
void setDetectorUpVector(double x, double y, double z)
Set the up-vector defining the orientation of the X-ray detector.
double getMassAttenuationFromHU(double HU, double anEnergy, const std::string &aUnitOfEnergy)
Accessor on the HU's mass attenuation.
double getLinearAttenuationCoefficient(const std::string &aLabel, double anEnergy, const std::string &aUnitOfEnergy)
Accessor on the linear attenuation coefficient at a given energy corresponding to the material proper...
void setMassAttenuationCoefficient(const std::string &aLabel, double aCoefficient, const std::string &aUnit)
Set the mass attenuation coefficient corresponding to the material properties of a polygon mesh....
double getUnitOfLength(const std::string &aUnitOfLength)
Accessor on the numerical value corresponding to a unit of length.
std::string getOpenGlVenror()
Accessor on the OpenGL vendor.
void cursorPositionCallback(double x, double y, int aViewportWidth, int aViewportHeight)
Call this function when the user moves the mouse.
double getTotalEnergyWithDetectorResponse()
Accessor on a total energy of the beam when the detector response is applied.
double getDensityFromElement(const std::string &anElement)
Accessor on the chemical element's density.
void setHU(const std::string &aLabel, short HU)
Set the Hounsfield value corresponding to the material properties of a polygon mesh.
void setMixture(const std::string &aLabel, const std::string &aMixture)
Set the mixture corresponding to the material properties of a polygon mesh. Don't forget to set the d...
void displayScene(bool aSceneRotationFlag=true, int aWindowID=-1)
3-D visualisation of the 3-D scene (source, detector, and scanned objects). Note that there is no int...
void addPolygonMeshAsOuterSurface(const std::string &aLabel)
Add a polygon mesh, given its label, to the X-ray renderer as an outer surface.
void moveToCentre()
Move the scenegraph to the centre.
void disableArtifactFiltering(void)
Disable artefact filtering altogether.
void createWindow(int aWindowID=-1, int aVisibilityFlag=0, const std::string &aRenderer="OPENGL", int aRendererMajorVersion=3, int aRendererMinorVersion=2)
Create an OpenGL context and display it in a window.
void addMesh(const std::string &aDestination, const std::string &aSource)
Add a polygon mesh (aSource) to another one (aDestination). It corresponds to the operation as follow...
void setHounsfieldValue(const std::string &aLabel, short HU)
Set the Hounsfield value corresponding to the material properties of a polygon mesh.
void loadDetectorEnergyResponse(const std::string &aFileName, const std::string &aUnitOfEnergy)
Load the energy response of the detector from a TSV file.
void applyCurrentLocalTransformation(const std::string &aLabel)
Apply the current local transformation to all the vertices of a given node in the scenegraph....
void setCompound(const std::string &aLabel, const std::string &aCompound)
Set the compound corresponding to the material properties of a polygon mesh. Don't forget to set the ...
void makeCylinder(const std::string &aLabel, unsigned int aNumberOfSectors=10, double aHeight=1.0, double aRadius=0.5, const std::string &aUnitOfLength="cm", const std::string &aParent="root")
Create a cylinder and set its label in the scenegraph (i.e. identifier). Note that it is not added to...
int getMajorVersionOfCoreGVXR()
Accessor on the major version of the core gVirtualXRay library (gvxr). This number is changed when in...
std::vector< float > getDiffuseColour(const std::string &aLabel)
Accessor on the diffuse colour of the material of a given polygon mesh.
void invertNormalVectors(const std::string &aLabel)
Invert the normal vectors of a given polygon mesh.
void enableArtifactFilteringOnCPU(void)
Enable artefact filtering on CPU (can be extremely slow as it makes use of ray-tracing).
void usePointSource()
Use a point source.
void rotateScene(double anAngle, double x, double y, double z)
Rotate the 3-D scene (all the polygon meshes will be affected but not modified).
std::vector< float > rayIntersect(const std::string &aLabel, double aRayOriginX, double aRayOriginY, double aRayOriginZ, double aRayDirectionX, double aRayDirectionY, double aRayDirectionZ)
int getMinorVersionOfCoreGVXR()
Accessor on the minor version of the core gVirtualXRay library (gvxr). This number is changed when ne...
void resetBeamSpectrum()
Set the size of the focal spot of the X-ray generator.
void addEnergyBinToSpectrum(double anEnergy, const std::string &aUnitOfEnergy, double aNumberOfPhotons)
Add an energy bin to the beam spectrum (useful to generate polychromatism).
void setDetectorNumberOfPixels(int aWidth, int aHeight)
Set the number of pixels of the X-ray detector.
float getShininess(const std::string &aLabel)
Accessor on the shininess of the material of a given polygon mesh.
void setDetectorPixelSize(double aWidth, double aHeight, const std::string &aUnitOfLength)
Set the pixel size.
void setDetectorPosition(double x, double y, double z, const std::string &aUnitOfLength)
Set the position of the X-ray detector.
void disableArtefactFiltering(void)
Disable artefact filtering altogether.
void scaleScene(double x, double y, double z)
Scale the 3-D scene (all the polygon meshes will be affected but not modified).
int getMinorVersionOfSimpleGVXR()
Accessor on the minor version of SimpleGVXR. This number is changed when new functionalities have bee...
void moveToCenter()
Move the scenegraph to the centre.
void setLocalTransformationMatrix(const std::string &aLabel, const std::vector< double > &aMatrix)
Set the local transformation matrix of a given node in the scenegraph.
void stopArcBallRotation()
Call this function when the user stops an arc-ball rotation (e.g. release the left-mouse button click...
void subtractMesh(const std::string &aDestination, const std::string &aSource)
Subtract a polygon mesh (aSource) from another one (aDestination). It corresponds to the operation as...
std::string getMaterialLabel(const std::string &aLabel)
Accessor on the material label of a polygon mesh.
std::vector< std::vector< float > > getNodeWorldTransformationMatrix(const std::string &aLabel)
Accessor on the transformation matrix of a given node.
void setColour(const std::string &aLabel, float R, float G, float B, float A)
Set the colour of a given polygon mesh.
void setMu(const std::string &aLabel, double aCoefficient, const std::string &aUnit)
Set the linear attenuation coefficient corresponding to the material properties of a polygon mesh.
void setSceneTransformationMatrix(const std::vector< std::vector< float > > &aMatrix)
Set the 3-D scene transformation matrix.
void lookAt(double eyeX, double eyeY, double eyeZ, double lookAtX, double lookAtY, double lookAtZ, double upX, double upY, double upZ)
Replace the modelling-viewing matrix by a viewing transformation matrix. It behaves as the old gluLoo...
std::string getVersionOfSimpleGVXR()
Accessor on the full string version of SimpleGVXR.
std::vector< float > getSpecularColour(const std::string &aLabel)
Accessor on the specular colour of the material of a given polygon mesh.
std::string getVersionOfCoreGVXR()
Accessor on the full string version of the core gVirtualXRay library (gvxr).
std::vector< std::vector< float > > getSceneTransformationMatrix()
Accessor on the 3-D scene transformation matrix.
void setHounsfieldUnit(const std::string &aLabel, short HU)
Set the Hounsfield value corresponding to the material properties of a polygon mesh.
const std::vector< std::vector< std::vector< float > > > & getLatestScreenshot()
Get the latest screenshot.
std::vector< double > getNodeAndChildrenBoundingBox(const std::string &aLabel, const std::string &aUnitOfLength="cm")
Access the bounding box of a given node and all its children (if any). The bounding box is given in t...
std::vector< std::vector< float > > getNodeLocalTransformationMatrix(const std::string &aLabel)
Accessor on the transformation matrix of a given node.
void saveSTLfile(const std::string &aLabel, const std::string &aFileName=std::string())
Save the polygon mesh of a given node.
void removePolygonMeshesFromXRayRenderer()
Empty the X-ray renderer from all its meshes. Note that the meshes are kept in the scenegraph.
std::vector< std::vector< float > > getRootTransformationMatrix()
Accessor on the transformation matrix of the scengraph's root node.
void saveLastSinogram(const std::string &aFileName=std::string(), bool useCompression=true)
Save the last sinogram that has been computed.
std::vector< std::vector< std::vector< float > > > getLastSinogram()
Accessor on the last sinogram that has been computed.
void setSourcePosition(double x, double y, double z, const std::string &aUnitOfLength)
Set the position of the X-ray source.
unsigned int getNumberOfChildren(const std::string &aLabel)
Get the number of children of a node in the scenegraph.
double getMassAttenuationCoefficient(const std::string &aLabel, double anEnergy, const std::string &aUnitOfEnergy)
Accessor on the mass attenuation coefficient at a given energy corresponding to the material properti...
void destroyAllWindows(void)
Close and destroy all the windows and OpenGL contexts that have been created.
void enableArtefactFilteringOnGPU(void)
Enable artefact filtering on GPU (it is fast but can be inaccurate).
void autoCreateOpenGLContext(bool aFlag=true)
Create an OpenGL context automatically.
void orthographic(double left, double right, double bottom, double top, double zNear, double zFar)
Replace the projection matrix by a orthographic projection matrix. It behaves as the old glOrtho func...
double getDensityFromHU(double HU)
Accessor on the HU's density.
std::vector< std::vector< float > > getLastLBuffer()
Accessor on the last L-buffer that has been computed.
std::vector< std::vector< std::vector< float > > > computeSinogram(double x, double y, double z, const std::string &aUnitOfLength, unsigned int aNumberOfAngle, double anAngleOffset)
Compute the sinogram corresponding to the environment that has previously been set,...
void loadSceneGraph(const std::string &aFileName, const std::string &aUnitOfLength)
Load a scenegraph from a file and add its polygon meshes to the X-ray renderer.
void renderLoop(int aWindowID=-1)
3-D visualisation of the 3-D scene (source, detector, and scanned objects). Note that there is intera...
const std::vector< std::vector< std::vector< float > > > & takeScreenshot(int aWindowID=-1)
Take screenshot.
void showWindow(int aWindowID=-1)
Make an OpenGL context visible and display a window.
std::vector< double > getDetectorPosition(const std::string &aUnitOfLength)
Accessor on the position of the X-ray detector.
unsigned short getElementAtomicNumber(const std::string &anElement)
Accessor on the chemical element's Z number.
void makeIsoSurface(const std::string &aLabel, short anIsoValue, const std::vector< short > &aVoxelDataSet, unsigned int aWidth, unsigned int aHeight, unsigned int aDepth, double aSpacingX, double aSpacingY, double aSpacingZ, const std::string &aUnitOfLength="cm", const std::string &aParent="root")
Create an iso-surface from a 3D image and set its label in the scenegraph (i.e. identifier)....
double getMassAttenuationFromMixture(const std::string &aMixture, double anEnergy, const std::string &aUnitOfEnergy)
Accessor on the mixture's mass attenuation.
void setWindowBackGroundColor(float R, float G, float B, int aWindowID=-1)
Set window background colour.
unsigned int getNumberOfPrimitives(const std::string &aLabel)
Accessor on the number of primitives of a given node.
std::vector< std::vector< float > > computeLBuffer(const std::string &aLabel)
Compute the L-buffer of a polygon mesh corresponding to the environment that has previously been set,...
std::vector< float > getImageRow(const std::vector< std::vector< float > > &anImage, int j)
Accessor on the j-th row of pixels of a given image.
void perspective(double fovy, double aspect, double zNear, double zFar)
Replace the projection matrix by a perspective projection matrix. It behaves as the old gluPerspectiv...
void scrollCallback(double xoffset, double yoffset)
Call this function when the user scrolls.
int getPatchVersionOfCoreGVXR()
Accessor on the minor version of the core gVirtualXRay library (gvxr). This number is changed when bu...
void emptyMesh(const std::string &aLabel, const std::string &aParent="root")
Create an empty polygon mesh and set its label in the scenegraph (i.e. identifier)....
std::vector< std::vector< float > > computeXRayImage(bool anIntegrateEnergyFlag=true)
Compute the X-ray projection corresponding to the environment that has previously been set,...
void resetSceneTransformation()
Replace the 3-D transformation matrix of the overall 3-D scene by an identity matrix.
void enableArtefactFilteringOnCPU(void)
Enable artefact filtering on CPU (can be extremely slow as it makes use of ray-tracing).
void setColor(const std::string &aLabel, float R, float G, float B, float A)
Set the color of a given polygon mesh.
void useParallelSource()
Use a parallel source (e.g. to mimic a source that is extremely far from the scanned object and detec...
void setOversamplingFactor(int aFactor=1)
Set the multiplicative factor to oversample the L-buffers.
void scaleNode(const std::string &aLabel, double x, double y, double z)
Scale a polygon mesh.
void removePolygonMeshesFromSceneGraph()
Empty the scenegraph. Note that it also empties the X-ray renderer from all its meshes.
void pushModelViewMatrix()
Add the current matrix to the model/view matrix stack. It behaves as the combination of the old glMat...
bool usingArcBallRotation()
Check if arc-ball rotation is currently in use.
std::vector< double > getLocalTransformationMatrix(const std::string &aLabel)
Accessor on the local transformation matrix of a given node in the scenegraph. If the node does not e...
std::vector< int > getDetectorNumberOfPixels()
Accessor on the number of pixels of the X-ray detector.
void setElement(const std::string &aLabel, unsigned short Z)
Set the chemical element (or element) corresponding to the material properties of a polygon mesh.