SimpleGVXR 1.0.1
Welcome to SimpleGVXR, a simplified layer built on top of gVirtualXRay -- the open-source cross-platform library for the simulation of X-ray images from polygon meshes on the GPU. SimpleGVXR: i) is a C++ library, ii) provides a simplified, easy-to-use, and procedural interface to gVirtualXRay without templates, and iii) provides binders for other programming languages (Python 2 and 3, Ruby, R, TCL, Java, GNU Octave, Perl, and C#, and soon Matlab).
|
SimpleGVXR is an API to the bulk functionalities and classes of gVirtualXRay. SimpleGVXR is used as the basis for the language bindings generated using SWIG. More...
#include <vector>
#include <string>
Go to the source code of this file.
Functions | |
int | getMajorVersionOfCoreGVXR () |
Accessor on the major version of the core gVirtualXRay library (gvxr). This number is changed when incompatible API changes have been made. More... | |
int | getMinorVersionOfCoreGVXR () |
Accessor on the minor version of the core gVirtualXRay library (gvxr). This number is changed when new functionalities have been added in a backwards-compatible manner. More... | |
int | getPatchVersionOfCoreGVXR () |
Accessor on the minor version of the core gVirtualXRay library (gvxr). This number is changed when bug fixes have been added in a backwards-compatible manner. More... | |
std::string | getVersionOfCoreGVXR () |
Accessor on the full string version of the core gVirtualXRay library (gvxr). More... | |
int | getMajorVersionOfSimpleGVXR () |
Accessor on the major version of SimpleGVXR. This number is changed when incompatible API changes have been made. More... | |
int | getMinorVersionOfSimpleGVXR () |
Accessor on the minor version of SimpleGVXR. This number is changed when new functionalities have been added in a backwards-compatible manner. More... | |
int | getPatchVersionOfSimpleGVXR () |
Accessor on the minor version of SimpleGVXR. This number is changed when bug fixes have been added in a backwards-compatible manner. More... | |
std::string | getVersionOfSimpleGVXR () |
Accessor on the full string version of SimpleGVXR. More... | |
std::string | getOpenGlRenderer () |
Accessor on the OpenGL renderer. More... | |
std::string | getOpenGlVersion () |
Accessor on the OpenGL version. More... | |
std::string | getOpenGlVenror () |
Accessor on the OpenGL vendor. More... | |
void | useLogFile (const char *aFileName="gvxr.log") |
void | displayBeam (bool aState=true) |
void | displayDetector (bool aState=true) |
void | displayNormalVectors (bool aState=true) |
void | useWireframe (bool aState=true) |
void | useLighing (bool aState=true) |
void | useNegative (bool aState=true) |
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 function. More... | |
void | perspective (double fovy, double aspect, double zNear, double zFar) |
Replace the projection matrix by a perspective projection matrix. It behaves as the old gluPerspective function. More... | |
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 gluLookAt function. More... | |
void | pushModelViewMatrix () |
Add the current matrix to the model/view matrix stack. It behaves as the combination of the old glMatrixMode(GL_MODELVIEW);glPushMatrix() functions. | |
void | popModelViewMatrix () |
Restore the matrix from the model/view matrix stack, and remove the last matrix of the stack. glMatrixMode(GL_MODELVIEW);glPopMatrix() functions. | |
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. glMatrixMode(GL_MODELVIEW);glRotate() functions. More... | |
void | autoCreateOpenGLContext (bool aFlag=true) |
Create an OpenGL context automatically. More... | |
void | setSourcePosition (double x, double y, double z, const std::string &aUnitOfLength) |
Set the position of the X-ray source. More... | |
std::vector< double > | getSourcePosition (const std::string &aUnitOfLength) |
Accessor on the position of the X-ray source. More... | |
void | setDetectorPosition (double x, double y, double z, const std::string &aUnitOfLength) |
Set the position of the X-ray detector. More... | |
std::vector< double > | getDetectorPosition (const std::string &aUnitOfLength) |
Accessor on the position of the X-ray detector. More... | |
void | setDetectorUpVector (double x, double y, double z) |
Set the up-vector defining the orientation of the X-ray detector. More... | |
std::vector< double > | getDetectorUpVector () |
Accessor on the up-vector defining the orientation of the X-ray detector. More... | |
std::vector< double > | getDetectorRightVector () |
Accessor on the right-vector defining the orientation of the X-ray detector. More... | |
void | setDetectorNumberOfPixels (int aWidth, int aHeight) |
Set the number of pixels of the X-ray detector. More... | |
std::vector< int > | getDetectorNumberOfPixels () |
Accessor on the number of pixels of the X-ray detector. More... | |
void | setOversamplingFactor (int aFactor=1) |
Set the multiplicative factor to oversample the L-buffers. More... | |
int | getOversamplingFactor () |
Accessor on the multiplicative factor to oversample the L-buffers. More... | |
void | setDetectorPixelSize (double aWidth, double aHeight, const std::string &aUnitOfLength) |
Set the pixel size. More... | |
std::vector< double > | getDetectorSize (const std::string &aUnitOfLength) |
Accessor on the size of the X-ray detector. More... | |
void | clearDetectorEnergyResponse () |
Clear the energy response of the detector. | |
void | loadDetectorEnergyResponse (const std::string &aFileName, const std::string &aUnitOfEnergy) |
Load the energy response of the detector from a TSV file. More... | |
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 X-ray renderer. More... | |
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. More... | |
unsigned int | getNumberOfPrimitives (const std::string &aLabel) |
Accessor on the number of primitives of a given node. More... | |
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). Note that it is not added to the X-ray renderer. More... | |
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). Note that it is not added to the X-ray renderer. More... | |
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 the X-ray renderer. More... | |
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). Note that it is not added to the X-ray renderer. More... | |
void | makeTriangularMesh (const std::string &aLabel, const std::vector< float > &aVertexSet, const std::string &aUnitOfLength="cm", const std::string &aParent="root") |
void | makeTriangularMesh (const std::string &aLabel, const std::vector< float > &aVertexSet, const std::vector< int > &aTriangleIndexSet, const std::string &aUnitOfLength="cm", const std::string &aParent="root") |
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 follows: aDestination += aSource. Both aSource and aDestination have to already exist in the scenegraph. More... | |
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 follows: aDestination -= aSource. Both aSource and aDestination have to already exist in the scenegraph. More... | |
unsigned int | getNumberOfChildren (const std::string &aLabel) |
Get the number of children of a node in the scenegraph. More... | |
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. More... | |
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 exist, the identity matrix is returned. More... | |
void | setLocalTransformationMatrix (const std::string &aLabel, const std::vector< double > &aMatrix) |
Set the local transformation matrix of a given node in the scenegraph. More... | |
void | applyCurrentLocalTransformation (const std::string &aLabel) |
Apply the current local transformation to all the vertices of a given node in the scenegraph. Note the the local transformation is then reset to the identity matrix. More... | |
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 the world coordinate system. More... | |
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 world coordinate system. More... | |
void | displayNode (const std::string &aLabel) |
Display the scenegraph node using OpenGL. More... | |
void | invertNormalVectors (const std::string &aLabel) |
Invert the normal vectors of a given polygon mesh. More... | |
void | setColor (const std::string &aLabel, float R, float G, float B, float A) |
Set the color of a given polygon mesh. More... | |
void | setColour (const std::string &aLabel, float R, float G, float B, float A) |
Set the colour of a given polygon mesh. More... | |
std::vector< float > | getAmbientColour (const std::string &aLabel) |
Accessor on the ambient colour of the material of a given polygon mesh. More... | |
std::vector< float > | getDiffuseColour (const std::string &aLabel) |
Accessor on the diffuse colour of the material of a given polygon mesh. More... | |
std::vector< float > | getSpecularColour (const std::string &aLabel) |
Accessor on the specular colour of the material of a given polygon mesh. More... | |
float | getShininess (const std::string &aLabel) |
Accessor on the shininess of the material of a given polygon mesh. More... | |
void | addPolygonMeshAsInnerSurface (const std::string &aLabel) |
Add a polygon mesh, given its label, to the X-ray renderer as an inner surface. More... | |
void | addPolygonMeshAsOuterSurface (const std::string &aLabel) |
Add a polygon mesh, given its label, to the X-ray renderer as an outer surface. More... | |
void | removePolygonMeshesFromSceneGraph () |
Empty the scenegraph. Note that it also empties the X-ray renderer from all its meshes. | |
void | removePolygonMeshesFromXRayRenderer () |
Empty the X-ray renderer from all its meshes. Note that the meshes are kept in the scenegraph. | |
void | moveToCenter () |
Move the scenegraph to the centre. | |
void | moveToCentre () |
Move the scenegraph to the centre. | |
void | moveToCenter (const std::string &aLabel) |
Move a polygon mesh to the centre. More... | |
void | moveToCentre (const std::string &aLabel) |
Move a polygon mesh to the centre. More... | |
void | scaleNode (const std::string &aLabel, double x, double y, double z) |
Scale a polygon mesh. More... | |
void | rotateNode (const std::string &aLabel, double anAngle, double x, double y, double z) |
Rotate a polygon mesh. More... | |
void | translateNode (const std::string &aLabel, double x, double y, double z, const std::string &aUnitOfLength) |
Translate a polygon mesh. More... | |
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. More... | |
void | resetSceneTransformation () |
Replace the 3-D transformation matrix of the overall 3-D scene by an identity matrix. | |
void | scaleScene (double x, double y, double z) |
Scale the 3-D scene (all the polygon meshes will be affected but not modified). More... | |
void | scaleScene (double x, double y, double z, const std::string &aUnitOfLength) |
Scale the 3-D scene (all the polygon meshes will be affected but not modified). More... | |
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). More... | |
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). More... | |
std::vector< std::vector< float > > | getSceneTransformationMatrix () |
Accessor on the 3-D scene transformation matrix. More... | |
std::vector< std::vector< float > > | getRootTransformationMatrix () |
Accessor on the transformation matrix of the scengraph's root node. More... | |
std::vector< std::vector< float > > | getNodeLocalTransformationMatrix (const std::string &aLabel) |
Accessor on the transformation matrix of a given node. More... | |
std::vector< std::vector< float > > | getNodeWorldTransformationMatrix (const std::string &aLabel) |
Accessor on the transformation matrix of a given node. More... | |
void | setSceneTransformationMatrix (const std::vector< std::vector< float > > &aMatrix) |
Set the 3-D scene transformation matrix. More... | |
void | setRootTransformationMatrix (const std::vector< std::vector< float > > &aMatrix) |
Set the transformation matrix of the scengraph's root node. More... | |
void | setNodeTransformationMatrix (const std::string &aLabel, const std::vector< std::vector< float > > &aMatrix) |
Set the transformation matrix of a given node. More... | |
void | setHU (const std::string &aLabel, short HU) |
Set the Hounsfield value corresponding to the material properties of a polygon mesh. More... | |
void | setHounsfieldUnit (const std::string &aLabel, short HU) |
Set the Hounsfield value corresponding to the material properties of a polygon mesh. More... | |
void | setHounsfieldValue (const std::string &aLabel, short HU) |
Set the Hounsfield value corresponding to the material properties of a polygon mesh. More... | |
void | setElement (const std::string &aLabel, unsigned short Z) |
Set the chemical element (or element) corresponding to the material properties of a polygon mesh. More... | |
void | setElement (const std::string &aLabel, const std::string &aName) |
Set the chemical element (or element) corresponding to the material properties of a polygon mesh. More... | |
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 density of the material. More... | |
void | setMixture (const std::string &aLabel, const std::vector< int > &aZNumberSet, const std::vector< double > &aWeightSet) |
Set the mixture corresponding to the material properties of a polygon mesh. Don't forget to set the density of the material. More... | |
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 density of the material. More... | |
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. Don't forget to set the density of the material. More... | |
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. More... | |
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. More... | |
void | setDensity (const std::string &aLabel, double aDensity, const std::string &aUnit) |
Set the density corresponding to the material properties of a polygon mesh. More... | |
double | getDensity (const std::string &aLabel) |
Accessor on the density corresponding to the material properties of a polygon mesh. More... | |
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 properties of a polygon mesh. More... | |
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 properties of a polygon mesh. More... | |
std::string | getMaterialLabel (const std::string &aLabel) |
Accessor on the material label of a polygon mesh. More... | |
void | createOpenGLContext (int aWindowID=-1, int aRendererMajorVersion=3, int aRendererMinorVersion=2) |
Create an OpenGL context (the window won't be shown). More... | |
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. More... | |
void | setWindowSize (int aWidth, int aHeight, int aWindowID=-1) |
Create an OpenGL context and display it in a window. More... | |
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 interactive loop running. More... | |
void | renderLoop (int aWindowID=-1) |
3-D visualisation of the 3-D scene (source, detector, and scanned objects). Note that there is interactive loop running. Keys are: More... | |
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 visualisation window). More... | |
void | stopArcBallRotation () |
Call this function when the user stops an arc-ball rotation (e.g. release the left-mouse button click in the 3-D visualisation window). | |
bool | usingArcBallRotation () |
Check if arc-ball rotation is currently in use. More... | |
void | cursorPositionCallback (double x, double y, int aViewportWidth, int aViewportHeight) |
Call this function when the user moves the mouse. More... | |
void | scrollCallback (double xoffset, double yoffset) |
Call this function when the user scrolls. More... | |
void | setZoom (float aZoomValue) |
float | getZoom () |
void | setSceneRotationMatrix (const std::vector< double > &aRotationMatrix) |
std::vector< double > | getSceneRotationMatrix () |
void | showWindow (int aWindowID=-1) |
Make an OpenGL context visible and display a window. More... | |
void | hideWindow (int aWindowID=-1) |
Hide a window. More... | |
void | setWindowBackGroundColour (float R, float G, float B, int aWindowID=-1) |
Set window background colour. More... | |
void | setWindowBackGroundColor (float R, float G, float B, int aWindowID=-1) |
Set window background colour. More... | |
const std::vector< std::vector< std::vector< float > > > & | takeScreenshot (int aWindowID=-1) |
Take screenshot. More... | |
const std::vector< std::vector< std::vector< float > > > & | getLatestScreenshot () |
Get the latest screenshot. More... | |
void | destroyWindow (int aWindowID=-1) |
Close and destroy a given window or OpenGL context. | |
void | destroyAllWindows (void) |
Close and destroy all the windows and OpenGL contexts that have been created. | |
void | usePointSource () |
Use a point source. | |
void | useParallelBeam () |
Use a parallel source (e.g. to mimic a source that is extremely far from the scanned object and detector). | |
void | useParallelSource () |
Use a parallel source (e.g. to mimic a source that is extremely far from the scanned object and detector). | |
void | resetBeamSpectrum () |
Set the size of the focal spot of the X-ray generator. More... | |
void | setMonoChromatic (double anEnergy, const std::string &aUnitOfEnergy, double aNumberOfPhotons) |
Use a monochromatic beam spectrum (i.e. one single energy). More... | |
void | addEnergyBinToSpectrum (double anEnergy, const std::string &aUnitOfEnergy, double aNumberOfPhotons) |
Add an energy bin to the beam spectrum (useful to generate polychromatism). More... | |
void | loadSpectrumFromTSV (const std::string &aFileName, const std::string &aUnitOfEnergy, bool aNormalisationFlag) |
Load the incident beam energy spectrum from a TSV file. More... | |
std::vector< double > | getEnergyBins (const std::string &aUnitOfEnergy) |
Accessor on the energy bins of the beam spectrum. More... | |
std::vector< double > | getPhotonCountEnergyBins () |
Accessor on the number of photons per energy bin of the beam spectrum. More... | |
double | getTotalEnergyWithDetectorResponse () |
Accessor on a total energy of the beam when the detector response is applied. More... | |
void | saveSTLfile (const std::string &aLabel, const std::string &aFileName=std::string()) |
Save the polygon mesh of a given node. More... | |
void | saveLastXRayImage (const std::string &aFileName=std::string(), bool useCompression=true) |
Save the last X-ray image that has been computed. More... | |
void | saveLastLBuffer (const std::string &aFileName=std::string(), bool useCompression=true) |
Save the last L-buffer that has been computed. More... | |
void | saveLastCumulatedLBuffer (const std::string &aFileName=std::string(), bool useCompression=true) |
Save the last cumulated L-buffer that has been computed. More... | |
void | saveLastSinogram (const std::string &aFileName=std::string(), bool useCompression=true) |
Save the last sinogram that has been computed. More... | |
void | saveLastProjectionSet (const std::string &aFileName=std::string(), bool useCompression=true) |
Save the last projection set that has been computed. More... | |
void | enableArtefactFilteringOnGPU (void) |
Enable artefact filtering on GPU (it is fast but can be inaccurate). | |
void | enableArtifactFilteringOnGPU (void) |
Enable artefact filtering on GPU (it is fast but can be inaccurate). | |
void | enableArtefactFilteringOnCPU (void) |
Enable artefact filtering on CPU (can be extremely slow as it makes use of ray-tracing). | |
void | enableArtifactFilteringOnCPU (void) |
Enable artefact filtering on CPU (can be extremely slow as it makes use of ray-tracing). | |
void | disableArtefactFiltering (void) |
Disable artefact filtering altogether. | |
void | disableArtifactFiltering (void) |
Disable artefact filtering altogether. | |
double | getUnitOfEnergy (const std::string &aUnitOfEnergy) |
Accessor on the numerical value corresponding to a unit of energy. More... | |
double | getUnitOfLength (const std::string &aUnitOfLength) |
Accessor on the numerical value corresponding to a unit of length. More... | |
std::vector< std::vector< float > > | computeXRayImage (bool anIntegrateEnergyFlag=true) |
Compute the X-ray projection corresponding to the environment that has previously been set, i.e. More... | |
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, i.e. More... | |
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, i.e. More... | |
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, i.e. More... | |
std::vector< std::vector< float > > | getLastXRayImage () |
Accessor on the last X-ray image that has been computed. More... | |
std::vector< std::vector< float > > | getLastLBuffer () |
Accessor on the last L-buffer that has been computed. More... | |
std::vector< std::vector< std::vector< float > > > | getLastSinogram () |
Accessor on the last sinogram that has been computed. More... | |
std::vector< std::vector< std::vector< float > > > | getLastProjectionSet () |
Accessor on the last projection set that has been computed. More... | |
int | getImageWidth (const std::vector< std::vector< float > > &anImage) |
Accessor on the width of a given image. More... | |
int | getImageHeght (const std::vector< std::vector< float > > &anImage) |
Accessor on the height of a given image. More... | |
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. More... | |
std::string | getElementName (unsigned short Z) |
Accessor on the chemical element's name depending on its Z number. More... | |
std::string | getElementSymbol (unsigned short Z) |
Accessor on the chemical element' symbol depending on its Z number. More... | |
unsigned short | getElementAtomicNumber (const std::string &anElement) |
Accessor on the chemical element's Z number. More... | |
double | getDensityFromElement (const std::string &anElement) |
Accessor on the chemical element's density. More... | |
double | getDensityFromElement (unsigned short Z) |
Accessor on the chemical element's density. More... | |
double | getDensityFromHU (double HU) |
Accessor on the HU's density. More... | |
double | getMassAttenuationFromElement (const std::string &anElement, double anEnergy, const std::string &aUnitOfEnergy) |
Accessor on the chemical element's mass attenuation. More... | |
double | getMassAttenuationFromElement (unsigned short Z, double anEnergy, const std::string &aUnitOfEnergy) |
Accessor on the chemical element's mass attenuation. More... | |
double | getMassAttenuationFromHU (double HU, double anEnergy, const std::string &aUnitOfEnergy) |
Accessor on the HU's mass attenuation. More... | |
double | getMassAttenuationFromMixture (const std::string &aMixture, double anEnergy, const std::string &aUnitOfEnergy) |
Accessor on the mixture's mass attenuation. More... | |
double | getMassAttenuationFromCompound (const std::string &aCompound, double anEnergy, const std::string &aUnitOfEnergy) |
Accessor on the compound's mass attenuation. More... | |
double | getMuFromHU (double HU, double anEnergy, const std::string &aUnitOfEnergy) |
Accessor on the HU's linear attenuation coefficient. More... | |
std::vector< std::vector< std::vector< float > > > | convertHU2mu (const std::vector< std::vector< std::vector< float > > > &anImage, double anEnergy, const std::string &aUnitOfEnergy) |
std::vector< float > | rayIntersect (const std::string &aLabel, double aRayOriginX, double aRayOriginY, double aRayOriginZ, double aRayDirectionX, double aRayDirectionY, double aRayDirectionZ) |
std::vector< std::vector< float > > | loadImage2D (const std::string &aFileName) |
std::vector< std::vector< std::vector< float > > > | loadImage3D (const std::string &aFileName) |
double | computeZNCC (const std::vector< std::vector< std::vector< float > > > &aReferenceImage, const std::vector< std::vector< std::vector< float > > > &aTestImage) |
double | computeRMSE (const std::vector< std::vector< std::vector< float > > > &aReferenceImage, const std::vector< std::vector< std::vector< float > > > &aTestImage) |
double | getMean (const std::vector< float > &anImage) |
double | getStddev (const std::vector< float > &anImage) |
double | computeZNCC (const std::vector< float > &aReferenceImage, const std::vector< float > &aTestImage) |
double | computeRMSE (const std::vector< float > &aReferenceImage, const std::vector< float > &aTestImage, bool normalise=false) |
double | computeRMSE (bool normalise=false) |
double | computeZNCC () |
void | loadReference (const std::vector< float > &aReferenceImage) |
void | loadTest (const std::vector< float > &aTestImage) |
void | lineariseTest (float aThreshold, float aScalingFactor) |
float | getMinValue (const std::vector< std::vector< std::vector< float > > > &aImage) |
float | getMaxValue (const std::vector< std::vector< std::vector< float > > > &aImage) |
SimpleGVXR is an API to the bulk functionalities and classes of gVirtualXRay. SimpleGVXR is used as the basis for the language bindings generated using SWIG.
License BSD 3-Clause License.
For details on use and redistribution please refer to http://opensource.org/licenses/BSD-3-Clause
Copyright (c) by Dr Franck P. Vidal (franc.nosp@m.k.p..nosp@m.vidal.nosp@m.@fpv.nosp@m.idal..nosp@m.net), http://www.fpvidal.net/, Oct 2018, 2018, version 1.1, BSD 3-Clause License
void addEnergyBinToSpectrum | ( | double | anEnergy, |
const std::string & | aUnitOfEnergy, | ||
double | aNumberOfPhotons | ||
) |
Add an energy bin to the beam spectrum (useful to generate polychromatism).
anEnergy | the incident photon energy |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
aNumberOfPhotons | the number of incident photons |
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 follows: aDestination += aSource. Both aSource and aDestination have to already exist in the scenegraph.
aDestination | the polygon mesh that is going to be modified |
aSource | the polygon mesh that is going to be added to aDestination |
void addPolygonMeshAsInnerSurface | ( | const std::string & | aLabel | ) |
Add a polygon mesh, given its label, to the X-ray renderer as an inner surface.
aLabel | the label of the polygon mesh in the scenegraph |
void addPolygonMeshAsOuterSurface | ( | const std::string & | aLabel | ) |
Add a polygon mesh, given its label, to the X-ray renderer as an outer surface.
aLabel | the label of the polygon mesh in the scenegraph |
void applyCurrentLocalTransformation | ( | const std::string & | aLabel | ) |
Apply the current local transformation to all the vertices of a given node in the scenegraph. Note the the local transformation is then reset to the identity matrix.
aLabel | the label in the scenegraph |
void autoCreateOpenGLContext | ( | bool | aFlag = true | ) |
Create an OpenGL context automatically.
aFlag | true to create the OpenGL context automatically, false otherwise (default value: true) |
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, i.e.
aLabel | the label of the polygon mesh |
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, i.e.
x | the position of the rotation centre along the X-axis |
y | the position of the rotation centre along the Y-axis |
z | the position of the rotation centre along the Z-axis |
aUnitOfLength | the unit of length corresponding to the x, y and z parameters. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
aNumberOfAngle | the total number of projections in the projection set |
anAngleOffset | the angle in degrees between two successive projections |
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, i.e.
x | the position of the rotation centre along the X-axis |
y | the position of the rotation centre along the Y-axis |
z | the position of the rotation centre along the Z-axis |
aUnitOfLength | the unit of length corresponding to the x, y and z parameters. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
aNumberOfAngle | the total number of projections in the sinogram |
anAngleOffset | the angle in degrees between two successive projections |
std::vector< std::vector< float > > computeXRayImage | ( | bool | anIntegrateEnergyFlag = true | ) |
Compute the X-ray projection corresponding to the environment that has previously been set, i.e.
anIntegrateEnergyFlag | if true the energy fluence is returned, otherwise the number of photons is returned (default value: true) |
void createOpenGLContext | ( | int | aWindowID = -1 , |
int | aRendererMajorVersion = 3 , |
||
int | aRendererMinorVersion = 2 |
||
) |
Create an OpenGL context (the window won't be shown).
aWindowID | the numerical ID of the context to create (default value: -1, means that the ID will be automatically generated) |
aRendererMajorVersion | Select the major version of the renderer. (default value: 3) |
aRendererMajorVersion | Select the minor version of the renderer. (default value: 2) |
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.
aWindowID | the numerical ID of the context to create (default value: -1, means that the ID will be automatically generated) |
aRenderer | Select the renderer to use, e.g. OpenGL or Vulkan. (default value: OPENGL) |
aRendererMajorVersion | Select the major version of the renderer. (default value: 3) |
aRendererMajorVersion | Select the minor version of the renderer. (default value: 2) |
aVisibilityFlag | flag controling if the window should be visible (1) or hidden (0). (default value: 0) |
void cursorPositionCallback | ( | double | x, |
double | y, | ||
int | aViewportWidth, | ||
int | aViewportHeight | ||
) |
Call this function when the user moves the mouse.
x | the cursor x-axis position in the viewport coordinate system |
y | the cursor y-axis position in the viewport coordinate system |
aViewportWidth | the size of the viewport along the x-axis |
aViewportHeight | the size of the viewport along the y-axis |
void displayNode | ( | const std::string & | aLabel | ) |
Display the scenegraph node using OpenGL.
aLabel | the label of the polygon mesh |
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 interactive loop running.
aSceneRotationFlag | true if the 3-D scene has to be rotated with the arc-ball method, false otherwise (default value: true) |
aWindowID | the numerical ID of the corresponding context (default value: -1, means that the active context will be used) |
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). Note that it is not added to the X-ray renderer.
aLabel | the label in the scenegraph |
aParent | the parent of the node in the scenegraph (default: "root") |
std::vector< float > getAmbientColour | ( | const std::string & | aLabel | ) |
Accessor on the ambient colour of the material of a given polygon mesh.
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.
aLabel | the label in the scenegraph |
i | the ID of the child |
double getDensity | ( | const std::string & | aLabel | ) |
Accessor on the density corresponding to the material properties of a polygon mesh.
aLabel | the label of the polygon mesh |
double getDensityFromElement | ( | const std::string & | anElement | ) |
Accessor on the chemical element's density.
anElement | the name or symbol of the element |
double getDensityFromElement | ( | unsigned short | Z | ) |
Accessor on the chemical element's density.
Z | the Z number of the element |
double getDensityFromHU | ( | double | HU | ) |
Accessor on the HU's density.
HU | the HU |
std::vector< int > getDetectorNumberOfPixels | ( | ) |
Accessor on the number of pixels of the X-ray detector.
std::vector< double > getDetectorPosition | ( | const std::string & | aUnitOfLength | ) |
Accessor on the position of the X-ray detector.
aUnitOfLength | the unit of length corresponding to the returned value. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
std::vector< double > getDetectorRightVector | ( | ) |
Accessor on the right-vector defining the orientation of the X-ray detector.
std::vector< double > getDetectorSize | ( | const std::string & | aUnitOfLength | ) |
Accessor on the size of the X-ray detector.
aUnitOfLength | the unit of length corresponding to the returned value. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
std::vector< double > getDetectorUpVector | ( | ) |
Accessor on the up-vector defining the orientation of the X-ray detector.
std::vector< float > getDiffuseColour | ( | const std::string & | aLabel | ) |
Accessor on the diffuse colour of the material of a given polygon mesh.
unsigned short getElementAtomicNumber | ( | const std::string & | anElement | ) |
Accessor on the chemical element's Z number.
anElement | the name or symbol of the element |
std::string getElementName | ( | unsigned short | Z | ) |
Accessor on the chemical element's name depending on its Z number.
Z | the atomic number of the element |
std::string getElementSymbol | ( | unsigned short | Z | ) |
Accessor on the chemical element' symbol depending on its Z number.
Z | the atomic number of the element |
std::vector< double > getEnergyBins | ( | const std::string & | aUnitOfEnergy | ) |
Accessor on the energy bins of the beam spectrum.
aUnitOfEnergy | the unit of energy corresponding to the returned vector. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
int getImageHeght | ( | const std::vector< std::vector< float > > & | anImage | ) |
Accessor on the height of a given image.
anImage | the image |
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.
anImage | the image |
j | the row number |
int getImageWidth | ( | const std::vector< std::vector< float > > & | anImage | ) |
Accessor on the width of a given image.
anImage | the image |
std::vector< std::vector< float > > getLastLBuffer | ( | ) |
Accessor on the last L-buffer that has been computed.
std::vector< std::vector< std::vector< float > > > getLastProjectionSet | ( | ) |
Accessor on the last projection set that has been computed.
std::vector< std::vector< std::vector< float > > > getLastSinogram | ( | ) |
Accessor on the last sinogram that has been computed.
std::vector< std::vector< float > > getLastXRayImage | ( | ) |
Accessor on the last X-ray image that has been computed.
const std::vector< std::vector< std::vector< float > > > & getLatestScreenshot | ( | ) |
Get the latest screenshot.
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 properties of a polygon mesh.
aLabel | the label of the polygon mesh |
anEnergy | the photon energy of interest |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
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 exist, the identity matrix is returned.
aLabel | the label in the scenegraph |
int getMajorVersionOfCoreGVXR | ( | ) |
Accessor on the major version of the core gVirtualXRay library (gvxr). This number is changed when incompatible API changes have been made.
int getMajorVersionOfSimpleGVXR | ( | ) |
Accessor on the major version of SimpleGVXR. This number is changed when incompatible API changes have been made.
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 properties of a polygon mesh.
aLabel | the label of the polygon mesh |
anEnergy | the photon energy of interest |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
double getMassAttenuationFromCompound | ( | const std::string & | aCompound, |
double | anEnergy, | ||
const std::string & | aUnitOfEnergy | ||
) |
Accessor on the compound's mass attenuation.
aCompound | the details about the compound. It is given as a sequence of element symbol & number of atoms, e.g. H2O for water and SiC for silicon carbide. |
anEnergy | the photon energy of interest |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
double getMassAttenuationFromElement | ( | const std::string & | anElement, |
double | anEnergy, | ||
const std::string & | aUnitOfEnergy | ||
) |
Accessor on the chemical element's mass attenuation.
anElement | the name or symbol of the element |
anEnergy | the photon energy of interest |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
double getMassAttenuationFromElement | ( | unsigned short | Z, |
double | anEnergy, | ||
const std::string & | aUnitOfEnergy | ||
) |
Accessor on the chemical element's mass attenuation.
Z | the Z number of the element |
anEnergy | the photon energy of interest |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
double getMassAttenuationFromHU | ( | double | HU, |
double | anEnergy, | ||
const std::string & | aUnitOfEnergy | ||
) |
Accessor on the HU's mass attenuation.
HU | the HU |
anEnergy | the photon energy of interest |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
double getMassAttenuationFromMixture | ( | const std::string & | aMixture, |
double | anEnergy, | ||
const std::string & | aUnitOfEnergy | ||
) |
Accessor on the mixture's mass attenuation.
aMixture | the details about the mixture. It is given as a sequence of element symbol & relative weight, e.g. Ti90Al6V4. |
anEnergy | the photon energy of interest |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
std::string getMaterialLabel | ( | const std::string & | aLabel | ) |
Accessor on the material label of a polygon mesh.
aLabel | the label of the polygon mesh |
int getMinorVersionOfCoreGVXR | ( | ) |
Accessor on the minor version of the core gVirtualXRay library (gvxr). This number is changed when new functionalities have been added in a backwards-compatible manner.
int getMinorVersionOfSimpleGVXR | ( | ) |
Accessor on the minor version of SimpleGVXR. This number is changed when new functionalities have been added in a backwards-compatible manner.
double getMuFromHU | ( | double | HU, |
double | anEnergy, | ||
const std::string & | aUnitOfEnergy | ||
) |
Accessor on the HU's linear attenuation coefficient.
HU | the HU |
anEnergy | the photon energy of interest |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
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 the world coordinate system.
aLabel | the label in the scenegraph |
aUnitOfLength | the unit of length corresponding to the bounding box. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" (default value: "cm") |
std::vector< std::vector< float > > getNodeLocalTransformationMatrix | ( | const std::string & | aLabel | ) |
Accessor on the transformation matrix of a given node.
aLabel | the label of the polygon mesh |
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 world coordinate system.
aLabel | the label in the scenegraph |
aUnitOfLength | the unit of length corresponding to the bounding box. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" (default value: "cm") |
std::vector< std::vector< float > > getNodeWorldTransformationMatrix | ( | const std::string & | aLabel | ) |
Accessor on the transformation matrix of a given node.
aLabel | the label of the polygon mesh |
unsigned int getNumberOfChildren | ( | const std::string & | aLabel | ) |
Get the number of children of a node in the scenegraph.
aLabel | the label in the scenegraph |
unsigned int getNumberOfPrimitives | ( | const std::string & | aLabel | ) |
Accessor on the number of primitives of a given node.
aLabel | the label in the scenegraph |
std::string getOpenGlRenderer | ( | ) |
Accessor on the OpenGL renderer.
std::string getOpenGlVenror | ( | ) |
Accessor on the OpenGL vendor.
std::string getOpenGlVersion | ( | ) |
Accessor on the OpenGL version.
int getOversamplingFactor | ( | ) |
Accessor on the multiplicative factor to oversample the L-buffers.
int getPatchVersionOfCoreGVXR | ( | ) |
Accessor on the minor version of the core gVirtualXRay library (gvxr). This number is changed when bug fixes have been added in a backwards-compatible manner.
int getPatchVersionOfSimpleGVXR | ( | ) |
Accessor on the minor version of SimpleGVXR. This number is changed when bug fixes have been added in a backwards-compatible manner.
std::vector< double > getPhotonCountEnergyBins | ( | ) |
Accessor on the number of photons per energy bin of the beam spectrum.
std::vector< std::vector< float > > getRootTransformationMatrix | ( | ) |
Accessor on the transformation matrix of the scengraph's root node.
std::vector< std::vector< float > > getSceneTransformationMatrix | ( | ) |
Accessor on the 3-D scene transformation matrix.
float getShininess | ( | const std::string & | aLabel | ) |
Accessor on the shininess of the material of a given polygon mesh.
std::vector< double > getSourcePosition | ( | const std::string & | aUnitOfLength | ) |
Accessor on the position of the X-ray source.
aUnitOfLength | the unit of length corresponding to the returned value. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
std::vector< float > getSpecularColour | ( | const std::string & | aLabel | ) |
Accessor on the specular colour of the material of a given polygon mesh.
double getTotalEnergyWithDetectorResponse | ( | ) |
Accessor on a total energy of the beam when the detector response is applied.
double getUnitOfEnergy | ( | const std::string & | aUnitOfEnergy | ) |
Accessor on the numerical value corresponding to a unit of energy.
aUnitOfEnergy | the unit of energy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
double getUnitOfLength | ( | const std::string & | aUnitOfLength | ) |
Accessor on the numerical value corresponding to a unit of length.
aUnitOfLength | the unit of length. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
std::string getVersionOfCoreGVXR | ( | ) |
Accessor on the full string version of the core gVirtualXRay library (gvxr).
std::string getVersionOfSimpleGVXR | ( | ) |
Accessor on the full string version of SimpleGVXR.
void hideWindow | ( | int | aWindowID = -1 | ) |
Hide a window.
aWindowID | the numerical ID of the corresponding context (default value: -1, means that the active context will be used) |
void invertNormalVectors | ( | const std::string & | aLabel | ) |
Invert the normal vectors of a given polygon mesh.
aLabel | the label of the polygon mesh |
void loadDetectorEnergyResponse | ( | const std::string & | aFileName, |
const std::string & | aUnitOfEnergy | ||
) |
Load the energy response of the detector from a TSV file.
aFileName | name of the file. Each line of the file is formatted as follows: input_energy output_energy |
aUnitOfEnergy | the unit of energy corresponding to the data in the file |
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 X-ray renderer.
aLabel | the label in the scenegraph |
aFileName | the file where the polygon mesh data is stored |
aUnitOfLength | the unit of length corresponding to the data stored in the file. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" @addToRendererAsInnerSurface: a flag to add the mesh to the X-ray renderer (as an inner surface) (default value: true) |
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.
aFileName | the file where the polygon mesh data is stored |
aUnitOfLength | the unit of length corresponding to the data stored in the file. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
void loadSpectrumFromTSV | ( | const std::string & | aFileName, |
const std::string & | aUnitOfEnergy, | ||
bool | aNormalisationFlag | ||
) |
Load the incident beam energy spectrum from a TSV file.
aFileName | name of the file to load |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
aNormalisationFlag | true to normalise the total energy to 1, false otherwise |
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 gluLookAt function.
eyeX | Specifies the position of the eye point along the X-axis |
eyeY | Specifies the position of the eye point along the Y-axis |
eyeZ | Specifies the position of the eye point along the Z-axis |
lookAtX | Specifies the position of the reference point along the X-axis |
lookAtY | Specifies the position of the reference point along the Y-axis |
lookAtZ | Specifies the position of the reference point along the Z-axis |
upX | Specifies the direction of the up vector along the X-axis |
upY | Specifies the direction of the up vector along the Y-axis |
upZ | Specifies the direction of the up vector along the Z-axis |
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). Note that it is not added to the X-ray renderer.
aLabel | the label in the scenegraph |
aLength | the size of an edge of the cube |
aUnitOfLength | the unit of length corresponding to aLength. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" (default value: "cm") |
aParent | the parent of the node in the scenegraph (default: "root") |
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 the X-ray renderer.
aLabel | the label in the scenegraph |
aNumberOfSectors | the number of sector defining the mesh |
aHeight | the height of the cylinder |
aRadius | the radius of the cylinder |
aUnitOfLength | the unit of length corresponding to aHeight and aRadius. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" (default value: "cm") |
aParent | the parent of the node in the scenegraph (default: "root") |
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). Note that it is not added to the X-ray renderer.
aLabel | the label in the scenegraph |
anIsoValue | the iso-value |
aVoxelDataSet | the voxel dataset |
aWidth | the number of voxel along the X-axis |
aHeight | the number of voxel along the Y-axis |
aDepth | the number of voxel along the Z-axis |
aSpacingX | the space between the centre of two successive voxels along the X-axis |
aSpacingY | the space between the centre of two successive voxels along the Y-axis |
aSpacingZ | the space between the centre of two successive voxels along the Z-axis |
aUnitOfLength | the unit of length corresponding to aSpacingX, aSpacingY and aSpacingZ. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" (default value: "cm") |
aParent | the parent of the node in the scenegraph (default: "root") |
void moveToCenter | ( | const std::string & | aLabel | ) |
Move a polygon mesh to the centre.
aLabel | the label of the polygon mesh in the scenegraph |
void moveToCentre | ( | const std::string & | aLabel | ) |
Move a polygon mesh to the centre.
aLabel | the label of the polygon mesh in the scenegraph |
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 function.
left | Specify the coordinates for the left vertical clipping plane |
right | Specify the coordinates for the right vertical clipping plane |
bottom | Specify the coordinates for the bottom horizontal clipping plane |
top | Specify the coordinates for the top horizontal clipping plane |
zNear | Specify the distances to the near clipping plane. The value must be positive |
zFar | Specify the distances to the far clipping plane. The value must be positive |
void perspective | ( | double | fovy, |
double | aspect, | ||
double | zNear, | ||
double | zFar | ||
) |
Replace the projection matrix by a perspective projection matrix. It behaves as the old gluPerspective function.
fovy | specifies the field of view angle, in degrees, in the y-direction. |
aspect | Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). |
zNear | Specifies the distance from the viewer to the near clipping plane (always positive) |
zFar | Specifies the distance from the viewer to the far clipping plane (always positive). |
std::vector< float > rayIntersect | ( | const std::string & | aLabel, |
double | aRayOriginX, | ||
double | aRayOriginY, | ||
double | aRayOriginZ, | ||
double | aRayDirectionX, | ||
double | aRayDirectionY, | ||
double | aRayDirectionZ | ||
) |
void setShiftFilter(double aValue); void setScaleFilter(double aValue); double getShiftFilter(); double getScaleFilter();
void renderLoop | ( | int | aWindowID = -1 | ) |
3-D visualisation of the 3-D scene (source, detector, and scanned objects). Note that there is interactive loop running. Keys are:
aWindowID | the numerical ID of the corresponding context (default value: -1, means that the active context will be used) |
void resetBeamSpectrum | ( | ) |
Set the size of the focal spot of the X-ray generator.
x | size along the x-axis |
y | size along the y-axis |
z | size along the z-axis |
aUnitOfLength | the unit of length. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
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. glMatrixMode(GL_MODELVIEW);glRotate() functions.
anAngle | the angle of rotation in degrees |
x | the coordinate of the rotation axis along the X-axis |
y | the coordinate of the rotation axis along the Y-axis |
z | the coordinate of the rotation axis along the Z-axis |
void rotateNode | ( | const std::string & | aLabel, |
double | anAngle, | ||
double | x, | ||
double | y, | ||
double | z | ||
) |
Rotate a polygon mesh.
aLabel | the label of the polygon mesh to transform |
anAngle | the rotation angle in degrees |
x | the component of the rotation vector along the X-axis |
y | the component of the rotation vector along the Y-axis |
z | the component of the rotation vector along the Z-axis |
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).
anAngle | the rotation angle in degrees |
x | the component of the rotation vector along the X-axis |
y | the component of the rotation vector along the Y-axis |
z | the component of the rotation vector along the Z-axis |
void saveLastCumulatedLBuffer | ( | const std::string & | aFileName = std::string() , |
bool | useCompression = true |
||
) |
Save the last cumulated L-buffer that has been computed.
aFileName | the name of the output file (default: means that the filename will be automatically generated and the file saved in the current path) |
useCompression | use data compression is possible (default: true) |
void saveLastLBuffer | ( | const std::string & | aFileName = std::string() , |
bool | useCompression = true |
||
) |
Save the last L-buffer that has been computed.
aFileName | the name of the output file (default: means that the filename will be automatically generated and the file saved in the current path) |
useCompression | use data compression is possible (default: true) |
void saveLastProjectionSet | ( | const std::string & | aFileName = std::string() , |
bool | useCompression = true |
||
) |
Save the last projection set that has been computed.
aFileName | the name of the output file (default: 0 means that the filename will be automatically generated and the file saved in the current path) |
useCompression | use data compression is possible (default: true) |
void saveLastSinogram | ( | const std::string & | aFileName = std::string() , |
bool | useCompression = true |
||
) |
Save the last sinogram that has been computed.
aFileName | the name of the output file (default: 0 means that the filename will be automatically generated and the file saved in the current path) |
useCompression | use data compression is possible (default: true) |
void saveLastXRayImage | ( | const std::string & | aFileName = std::string() , |
bool | useCompression = true |
||
) |
Save the last X-ray image that has been computed.
aFileName | the name of the output file (default: means that the filename will be automatically generated and the file saved in the current path) |
useCompression | use data compression is possible (default: true) |
void saveSTLfile | ( | const std::string & | aLabel, |
const std::string & | aFileName = std::string() |
||
) |
Save the polygon mesh of a given node.
aLabel | the label of the polygon mesh |
aFileName | the name of the output file (default: means that the filename will be automatically generated and the file saved in the current path) |
void scaleNode | ( | const std::string & | aLabel, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Scale a polygon mesh.
aLabel | the label of the polygon mesh to transform |
x | the scaling factor along the X-axis |
y | the scaling factor along the Y-axis |
z | the scaling factor along the Z-axis |
void scaleScene | ( | double | x, |
double | y, | ||
double | z | ||
) |
Scale the 3-D scene (all the polygon meshes will be affected but not modified).
x | the scaling factor along the X-axis |
y | the scaling factor along the Y-axis |
z | the scaling factor along the Z-axis |
void scaleScene | ( | double | x, |
double | y, | ||
double | z, | ||
const std::string & | aUnitOfLength | ||
) |
Scale the 3-D scene (all the polygon meshes will be affected but not modified).
x | the scaling factor along the X-axis |
y | the scaling factor along the Y-axis |
z | the scaling factor along the Z-axis |
aUnitOfLength | the unit of length corresponding to the x, y and z parameters. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
void scrollCallback | ( | double | xoffset, |
double | yoffset | ||
) |
Call this function when the user scrolls.
xoffset | the scroll offset along the x-axis (not used) |
yoffset | the scroll offset along the y-axis (used for zooming in and out) |
void setColor | ( | const std::string & | aLabel, |
float | R, | ||
float | G, | ||
float | B, | ||
float | A | ||
) |
Set the color of a given polygon mesh.
aLabel | the label of the polygon mesh |
R | the red channel |
G | the green channel |
B | the blue channel |
A | the alpha channel |
void setColour | ( | const std::string & | aLabel, |
float | R, | ||
float | G, | ||
float | B, | ||
float | A | ||
) |
Set the colour of a given polygon mesh.
aLabel | the label of the polygon mesh |
R | the red channel |
G | the green channel |
B | the blue channel |
A | the alpha channel |
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 density of the material.
aLabel | the label of the polygon mesh |
aCompound | the details about the compound. It is given as a sequence of element symbol & number of atoms, e.g. H2O for water and SiC for silicon carbide. |
void setDensity | ( | const std::string & | aLabel, |
double | aDensity, | ||
const std::string & | aUnit | ||
) |
Set the density corresponding to the material properties of a polygon mesh.
aLabel | the label of the polygon mesh |
aDensity | the density |
aUnit | the unit corresponding to aDensity. Acceptable values are: "g/cm3" and "g.cm-3" |
void setDetectorNumberOfPixels | ( | int | aWidth, |
int | aHeight | ||
) |
Set the number of pixels of the X-ray detector.
aWidth | the number of pixels along the X-axis |
aHeight | the number of pixels along the Y-axis |
void setDetectorPixelSize | ( | double | aWidth, |
double | aHeight, | ||
const std::string & | aUnitOfLength | ||
) |
Set the pixel size.
aWidth | the pixel size along the X-axis |
aHeight | the pixel size along the Y-axis |
aUnitOfLength | the unit of length corresponding to the aWidth and aHeight parameters. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
void setDetectorPosition | ( | double | x, |
double | y, | ||
double | z, | ||
const std::string & | aUnitOfLength | ||
) |
Set the position of the X-ray detector.
x | the position along the X-axis |
y | the position along the Y-axis |
z | the position along the Z-axis |
aUnitOfLength | the unit of length corresponding to the x, y and z parameters. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
void setDetectorUpVector | ( | double | x, |
double | y, | ||
double | z | ||
) |
Set the up-vector defining the orientation of the X-ray detector.
x | the component of the vector along the X-axis |
y | the component of the vector along the Y-axis |
z | the component of the vector along the Z-axis |
void setElement | ( | const std::string & | aLabel, |
const std::string & | aName | ||
) |
Set the chemical element (or element) corresponding to the material properties of a polygon mesh.
aLabel | the label of the polygon mesh |
aName | the symbol or name corresponding to the element |
void setElement | ( | const std::string & | aLabel, |
unsigned short | Z | ||
) |
Set the chemical element (or element) corresponding to the material properties of a polygon mesh.
aLabel | the label of the polygon mesh |
Z | the atomic number (or Z number) corresponding to the element |
void setHounsfieldUnit | ( | const std::string & | aLabel, |
short | HU | ||
) |
Set the Hounsfield value corresponding to the material properties of a polygon mesh.
aLabel | the label of the polygon mesh |
HU | the Hounsfield value |
void setHounsfieldValue | ( | const std::string & | aLabel, |
short | HU | ||
) |
Set the Hounsfield value corresponding to the material properties of a polygon mesh.
aLabel | the label of the polygon mesh |
HU | the Hounsfield value |
void setHU | ( | const std::string & | aLabel, |
short | HU | ||
) |
Set the Hounsfield value corresponding to the material properties of a polygon mesh.
aLabel | the label of the polygon mesh |
HU | the Hounsfield value |
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.
aLabel | the label of the polygon mesh |
aCoefficient | the liner attenuation coefficient |
aUnit | the unit corresponding to aCoefficient. Acceptable values are: "cm-1" |
void setLocalTransformationMatrix | ( | const std::string & | aLabel, |
const std::vector< double > & | aMatrix | ||
) |
Set the local transformation matrix of a given node in the scenegraph.
aLabel | the label in the scenegraph |
aMatrix | the local transformation matrix |
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. Don't forget to set the density of the material.
aLabel | the label of the polygon mesh |
aCoefficient | the mass attenuation coefficient |
aUnit | the unit corresponding to aCoefficient. Acceptable values are: "cm2/g" and "cm2.g-1" |
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 density of the material.
aLabel | the label of the polygon mesh |
aMixture | the details about the mixture. It is given as a sequence of element symbol & relative weight, e.g. Ti90Al6V4. |
void setMixture | ( | const std::string & | aLabel, |
const std::vector< int > & | aZNumberSet, | ||
const std::vector< double > & | aWeightSet | ||
) |
Set the mixture corresponding to the material properties of a polygon mesh. Don't forget to set the density of the material.
aLabel | the label of the polygon mesh |
aZNumberSet | the array of Z numbers |
aWeightSet | the corresponding weights |
void setMonoChromatic | ( | double | anEnergy, |
const std::string & | aUnitOfEnergy, | ||
double | aNumberOfPhotons | ||
) |
Use a monochromatic beam spectrum (i.e. one single energy).
anEnergy | the incident photon energy |
aUnitOfEnergy | the unit of energy corresponding to anEnergy. Acceptable values are: "electronvolt", "eV", "kiloelectronvolt", "keV", "megaelectronvolt", "MeV" |
aNumberOfPhotons | the number of incident photons |
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.
aLabel | the label of the polygon mesh |
aCoefficient | the liner attenuation coefficient |
aUnit | the unit corresponding to aCoefficient. Acceptable values are: "cm-1" |
void setNodeTransformationMatrix | ( | const std::string & | aLabel, |
const std::vector< std::vector< float > > & | aMatrix | ||
) |
Set the transformation matrix of a given node.
aLabel | the label of the polygon mesh |
aMatrix | the transformation matrix as a 4x4 array |
void setOversamplingFactor | ( | int | aFactor = 1 | ) |
Set the multiplicative factor to oversample the L-buffers.
aFactor | the multiplicative factor (default value: 1, for no oversampling) |
void setRootTransformationMatrix | ( | const std::vector< std::vector< float > > & | aMatrix | ) |
Set the transformation matrix of the scengraph's root node.
aMatrix | the transformation matrix as a 4x4 array |
void setSceneTransformationMatrix | ( | const std::vector< std::vector< float > > & | aMatrix | ) |
Set the 3-D scene transformation matrix.
aMatrix | the transformation matrix as a 4x4 array |
void setSourcePosition | ( | double | x, |
double | y, | ||
double | z, | ||
const std::string & | aUnitOfLength | ||
) |
Set the position of the X-ray source.
x | the position along the X-axis |
y | the position along the Y-axis |
z | the position along the Z-axis |
aUnitOfLength | the unit of length corresponding to the x, y and z parameters. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
void setWindowBackGroundColor | ( | float | R, |
float | G, | ||
float | B, | ||
int | aWindowID = -1 |
||
) |
Set window background colour.
R | the red colour [0, 1] |
G | the green colour [0, 1] |
B | the blue colour [0, 1] |
aWindowID | the numerical ID of the corresponding context (default value: -1, means that the active context will be used) |
void setWindowBackGroundColour | ( | float | R, |
float | G, | ||
float | B, | ||
int | aWindowID = -1 |
||
) |
Set window background colour.
R | the red colour [0, 1] |
G | the green colour [0, 1] |
B | the blue colour [0, 1] |
aWindowID | the numerical ID of the corresponding context (default value: -1, means that the active context will be used) |
void setWindowSize | ( | int | aWidth, |
int | aHeight, | ||
int | aWindowID = -1 |
||
) |
Create an OpenGL context and display it in a window.
aWidth | the number of pixels along the X-axis |
aHeight | the number of pixels along the Y-axis |
aWindowID | the numerical ID of the corresponding context (default value: -1, means that the active context will be used) |
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.
aLabel | the label of the polygon mesh to transform |
yx | the yx component of the shear matrix |
zx | the zx component of the shear matrix |
xy | the xy component of the shear matrix |
zy | the zy component of the shear matrix |
xz | the xz component of the shear matrix |
yz | the yz component of the shear matrix |
void showWindow | ( | int | aWindowID = -1 | ) |
Make an OpenGL context visible and display a window.
aWindowID | the numerical ID of the corresponding context (default value: -1, means that the active context will be used) |
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 visualisation window).
x | the cursor x-axis position in the viewport coordinate system |
y | the cursor y-axis position in the viewport coordinate system |
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 follows: aDestination -= aSource. Both aSource and aDestination have to already exist in the scenegraph.
aDestination | the polygon mesh that is going to be modified |
aSource | the polygon mesh that is going to be subtracted from aDestination |
const std::vector< std::vector< std::vector< float > > > & takeScreenshot | ( | int | aWindowID = -1 | ) |
Take screenshot.
aWindowID | the numerical ID of the corresponding context (default value: -1, means that the active context will be used) |
void translateNode | ( | const std::string & | aLabel, |
double | x, | ||
double | y, | ||
double | z, | ||
const std::string & | aUnitOfLength | ||
) |
Translate a polygon mesh.
aLabel | the label of the polygon mesh to transform |
x | the component of the translation vector along the X-axis |
y | the component of the translation vector along the Y-axis |
z | the component of the translation vector along the Z-axis |
aUnitOfLength | the unit of length corresponding to the x, y and z parameters. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
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).
x | the component of the translation vector along the X-axis |
y | the component of the translation vector along the Y-axis |
z | the component of the translation vector along the Z-axis |
aUnitOfLength | the unit of length corresponding to the x, y and z parameters. Acceptable values are: "um", "micrometre", "micrometer", "mm", "millimetre", "millimeter", "cm", "centimetre", "centimeter", "dm", "decimetre", "decimeter", "m", "metre", "meter", "dam", "decametre", "decameter", "hm", "hectometre", "hectometer", "km", "kilometre", "kilometer" |
bool usingArcBallRotation | ( | ) |
Check if arc-ball rotation is currently in use.