MeVisLab Toolbox Reference
|
The SoSFMLImage field is the interface used by Inventor Nodes to access image data (in the current implementation from the ML - MeVis Image Processing Library) More...
#include <SoSFMLImage.h>
Public Member Functions | |
virtual void | setValue () |
Required by Inventor but not used. More... | |
SbBool | readValue (SoInput *in) override |
Required by Inventor but not used. More... | |
void | writeValue (SoOutput *out) const override |
Required by Inventor but not used. More... | |
bool | isValid () |
Checks whether there is a valid image available. More... | |
void | getSize (XVImageSize &size) |
Gets the size of the image. More... | |
void | getSize (int &x, int &y, int &z, int &c, int &t, int &u) |
Gets the size of the image. More... | |
void | getSize (int &x, int &y, int &z, int &c, int &t) |
Gets the size of the image. More... | |
void | getSize (int &x, int &y, int &z, int &c) |
Gets the size of the image. More... | |
void | getSize (int &x, int &y, int &z) |
Gets the size of the image. More... | |
void | getSize (int &x, int &y) |
Gets the size of the image. More... | |
void | getSize (MLint &x, MLint &y, MLint &z, MLint &c, MLint &t, MLint &u) |
Gets the size of the image. More... | |
void | getSize (MLint &x, MLint &y, MLint &z, MLint &c, MLint &t) |
Gets the size of the image. More... | |
void | getSize (MLint &x, MLint &y, MLint &z, MLint &c) |
Gets the size of the image. More... | |
void | getSize (MLint &x, MLint &y, MLint &z) |
Gets the size of the image. More... | |
void | getSize (MLint &x, MLint &y) |
Gets the size of the image. More... | |
void | getPageSize (XVImageSize &size) |
Gets the ML page size of the image. More... | |
MLint | getChannels () |
Returns the number of color channels. More... | |
bool | isChannelName (MLint n, const char *name) |
Check whether the name of the n-th channel is the given name . More... | |
MLint | getTimePoints () |
Returns the number of time points. More... | |
void | getType (MLDataType &dtype, size_t &dsize) |
Gets the type of the Image: number of channels, data type as defined in mlDataTypes.h, and data size (size of one voxel value). More... | |
void | getType (MLDataType &dtype) |
Gets the type of the Image: number of channels, data type as defined in mlDataTypes.h. More... | |
void | getVoxelSize (float &x, float &y, float &z) |
Gets the voxel size in floats. More... | |
void | getVoxelSize (double &x, double &y, double &z) |
Gets the voxel size in doubles. More... | |
void | getVoxelSize (float &x, float &y) |
Gets the voxel size in floats. More... | |
void | getVoxelSize (double &x, double &y) |
Gets the voxel size in doubles. More... | |
double | getVoxelVolumeInCubicMillimeters () |
Returns the volume of a single voxel in cubic millimeters (mm^3). More... | |
double | getVoxelVolumeInMilliliters () |
Returns the volume of a single voxel in milliliters (ml). More... | |
void | touch () override |
Forces a notification of a changed image. More... | |
unsigned int | getSerialNumber () |
Returns serial number of current image. More... | |
double | getMinValue () |
Returns the statistical minimum value of the image. More... | |
double | getMaxValue () |
Returns the statistical maximum value of the image. More... | |
const ml::ImagePropertyExtension * | getImagePropertyExtensionByType (const char *imagePropertyTypeClassName) |
Returns a pointer to a constant image property extension, or NULL if not available. More... | |
void | connectFromML (void *connector) |
Connects to an ML output connector field. More... | |
void | disconnectFromML () |
Disconnects from an ML output connector field. More... | |
void * | getConnector () |
Returns current ML connector or NULL if not connected. More... | |
ml::PagedImage * | getPagedImage () |
Returns access to the underlying ml::PagedImage. More... | |
bool | getTile3D (void *usrMem, MLDataType type, MLint x, MLint y, MLint z, MLint nx, MLint ny, MLint nz) |
Returns the 3D Tile in the specified user memory with format type. More... | |
bool | getScaledTile3D (void *usrMem, MLDataType type, MLint x, MLint y, MLint z, MLint nx, MLint ny, MLint nz, double srcMin, double srcMax, double dstMin, double dstMax) |
Returns the 3D Tile in the specified user memory with format type. More... | |
bool | getTile6D (void *usrMem, MLDataType type, XVImageSize &pos, XVImageSize &size) |
Returns the 6D Tile in the specified user memory with format type. More... | |
bool | getScaledTile6D (void *usrMem, MLDataType type, XVImageSize &pos, XVImageSize &size, double srcMin, double srcMax, double dstMin, double dstMax) |
Returns the 6D Tile in the specified user memory with format type. More... | |
void | getVoxelToWorldMatrix (float mat[16]) |
Gets the VoxelToWorldMatrix as a float array (according to ML conventions). More... | |
void | getVoxelToWorldMatrix (double mat[16]) |
Gets the VoxelToWorldMatrix as a double array (according to ML conventions). More... | |
void | getVoxelToWorldMatrix (SbMatrix &matrix) |
Gets the VoxelToWorldMatrix as an Inventor float matrix (transposed w.r.t. ML). More... | |
void | getVoxelToWorldMatrix (SbMatrixd &matrix) |
Gets the VoxelToWorldMatrix as an Inventor double matrix (transposed w.r.t. ML). More... | |
void | getWorldToVoxelMatrix (float mat[16]) |
Gets the WorldToVoxelMatrix as a float array (according to ML conventions). More... | |
void | getWorldToVoxelMatrix (double mat[16]) |
Gets the WorldToVoxelMatrix as a double array (according to ML conventions). More... | |
void | getWorldToVoxelMatrix (SbMatrix &matrix) |
Gets the WorldToVoxelMatrix as an Inventor float matrix (transposed w.r.t. ML). More... | |
void | getWorldToVoxelMatrix (SbMatrixd &matrix) |
Gets the WorldToVoxelMatrix as an Inventor double matrix (transposed w.r.t. ML). More... | |
void | mapVoxelToWorld (const SbVec3f &src, SbVec3f &dst) |
Maps from voxel to world coordinate in float vectors. More... | |
void | mapVoxelToWorld (const SbVec3d &src, SbVec3d &dst) |
Maps from voxel to world coordinate in double vectors. More... | |
void | mapWorldToVoxel (const SbVec3f &src, SbVec3f &dst) |
Maps from world to voxel coordinate in float vectors. More... | |
void | mapWorldToVoxel (const SbVec3d &src, SbVec3d &dst) |
Maps from world to voxel coordinate in double vectors. More... | |
void | mapVoxelToWorld (float voxelX, float voxelY, float voxelZ, float &worldX, float &worldY, float &worldZ) |
Maps from voxel to world coordinate in float values. More... | |
void | mapVoxelToWorld (double voxelX, double voxelY, double voxelZ, double &worldX, double &worldY, double &worldZ) |
Maps from voxel to world coordinate in double values. More... | |
void | mapWorldToVoxel (float worldX, float worldY, float worldZ, float &voxelX, float &voxelY, float &voxelZ) |
Maps from world to voxel coordinate in float values. More... | |
void | mapWorldToVoxel (double worldX, double worldY, double worldZ, double &voxelX, double &voxelY, double &voxelZ) |
Maps from world to voxel coordinate in double values. More... | |
bool | isVoxelInsideImage (double voxelX, double voxelY, double voxelZ) |
Checks whether the voxel coordinate (in doubles) is inside of the image extend. More... | |
bool | isVoxelInsideImage (const SbVec3f &voxelCoord) |
Checks whether the voxel coordinate is inside of the image extend. More... | |
bool | isVoxelInsideImage (const SbVec3d &voxelCoord) |
Checks whether the voxel coordinate is inside of the image extend. More... | |
Static Public Member Functions | |
static void | initClass () |
Initializes field class, setting up runtime type info. More... | |
Protected Attributes | |
SoSFMLImagePrivate * | _p |
Private data of the SoSFMLImage. More... | |
The SoSFMLImage field is the interface used by Inventor Nodes to access image data (in the current implementation from the ML - MeVis Image Processing Library)
Through the methods of this class, image data can be accessed without knowing who provides the data. If the input data changes, the SoSFMLImage field is touched with the touch() method. The data source can be set as an ML OutputConnector (connectFromML()) The SoSFMLImage is then attached to the OutputConnector via a ML FieldSensor, so that the SoSFMLImage is touched on any input change and can be watched by a SoFieldSensor to get notified of a changed input image.
Definition at line 70 of file SoSFMLImage.h.
void SoSFMLImage::connectFromML | ( | void * | connector | ) |
Connects to an ML output connector field.
void SoSFMLImage::disconnectFromML | ( | ) |
Disconnects from an ML output connector field.
MLint SoSFMLImage::getChannels | ( | ) |
Returns the number of color channels.
void* SoSFMLImage::getConnector | ( | ) |
Returns current ML connector or NULL if not connected.
const ml::ImagePropertyExtension* SoSFMLImage::getImagePropertyExtensionByType | ( | const char * | imagePropertyTypeClassName | ) |
Returns a pointer to a constant image property extension, or NULL if not available.
imagePropertyTypeClassName
contains the name of the ML_UTILS_NAMESPACE::RuntimeType representing the image property extension.
double SoSFMLImage::getMaxValue | ( | ) |
Returns the statistical maximum value of the image.
double SoSFMLImage::getMinValue | ( | ) |
Returns the statistical minimum value of the image.
ml::PagedImage* SoSFMLImage::getPagedImage | ( | ) |
Returns access to the underlying ml::PagedImage.
Returns NULL if no image is connected. The properties of the paged image are updated before returning the pointer.
void SoSFMLImage::getPageSize | ( | XVImageSize & | size | ) |
Gets the ML page size of the image.
bool SoSFMLImage::getScaledTile3D | ( | void * | usrMem, |
MLDataType | type, | ||
MLint | x, | ||
MLint | y, | ||
MLint | z, | ||
MLint | nx, | ||
MLint | ny, | ||
MLint | nz, | ||
double | srcMin, | ||
double | srcMax, | ||
double | dstMin, | ||
double | dstMax | ||
) |
Returns the 3D Tile in the specified user memory with format type.
This also scales the data from srcMin/srcMax to dstMin/dstMax.
bool SoSFMLImage::getScaledTile6D | ( | void * | usrMem, |
MLDataType | type, | ||
XVImageSize & | pos, | ||
XVImageSize & | size, | ||
double | srcMin, | ||
double | srcMax, | ||
double | dstMin, | ||
double | dstMax | ||
) |
Returns the 6D Tile in the specified user memory with format type.
This also scales the data from srcMin/srcMax to dstMin/dstMax.
unsigned int SoSFMLImage::getSerialNumber | ( | ) |
Returns serial number of current image.
The serial number is never equal to 0. The serial number is increased with each image change and can be used to determine whether the image has changed by storing a previous serial number and comparing it to the current one. It is recommended to use a SoFieldSensor on this field instead of using the serial number.
void SoSFMLImage::getSize | ( | int & | x, |
int & | y | ||
) |
Gets the size of the image.
void SoSFMLImage::getSize | ( | int & | x, |
int & | y, | ||
int & | z | ||
) |
Gets the size of the image.
void SoSFMLImage::getSize | ( | int & | x, |
int & | y, | ||
int & | z, | ||
int & | c | ||
) |
Gets the size of the image.
void SoSFMLImage::getSize | ( | int & | x, |
int & | y, | ||
int & | z, | ||
int & | c, | ||
int & | t | ||
) |
Gets the size of the image.
void SoSFMLImage::getSize | ( | int & | x, |
int & | y, | ||
int & | z, | ||
int & | c, | ||
int & | t, | ||
int & | u | ||
) |
Gets the size of the image.
Gets the size of the image.
Gets the size of the image.
Gets the size of the image.
void SoSFMLImage::getSize | ( | XVImageSize & | size | ) |
Gets the size of the image.
bool SoSFMLImage::getTile3D | ( | void * | usrMem, |
MLDataType | type, | ||
MLint | x, | ||
MLint | y, | ||
MLint | z, | ||
MLint | nx, | ||
MLint | ny, | ||
MLint | nz | ||
) |
Returns the 3D Tile in the specified user memory with format type.
bool SoSFMLImage::getTile6D | ( | void * | usrMem, |
MLDataType | type, | ||
XVImageSize & | pos, | ||
XVImageSize & | size | ||
) |
Returns the 6D Tile in the specified user memory with format type.
MLint SoSFMLImage::getTimePoints | ( | ) |
Returns the number of time points.
void SoSFMLImage::getType | ( | MLDataType & | dtype | ) |
Gets the type of the Image: number of channels, data type as defined in mlDataTypes.h.
void SoSFMLImage::getType | ( | MLDataType & | dtype, |
size_t & | dsize | ||
) |
Gets the type of the Image: number of channels, data type as defined in mlDataTypes.h, and data size (size of one voxel value).
void SoSFMLImage::getVoxelSize | ( | double & | x, |
double & | y | ||
) |
Gets the voxel size in doubles.
void SoSFMLImage::getVoxelSize | ( | double & | x, |
double & | y, | ||
double & | z | ||
) |
Gets the voxel size in doubles.
void SoSFMLImage::getVoxelSize | ( | float & | x, |
float & | y | ||
) |
Gets the voxel size in floats.
void SoSFMLImage::getVoxelSize | ( | float & | x, |
float & | y, | ||
float & | z | ||
) |
Gets the voxel size in floats.
void SoSFMLImage::getVoxelToWorldMatrix | ( | double | mat[16] | ) |
Gets the VoxelToWorldMatrix as a double array (according to ML conventions).
void SoSFMLImage::getVoxelToWorldMatrix | ( | float | mat[16] | ) |
Gets the VoxelToWorldMatrix as a float array (according to ML conventions).
void SoSFMLImage::getVoxelToWorldMatrix | ( | SbMatrix & | matrix | ) |
Gets the VoxelToWorldMatrix as an Inventor float matrix (transposed w.r.t. ML).
void SoSFMLImage::getVoxelToWorldMatrix | ( | SbMatrixd & | matrix | ) |
Gets the VoxelToWorldMatrix as an Inventor double matrix (transposed w.r.t. ML).
double SoSFMLImage::getVoxelVolumeInCubicMillimeters | ( | ) |
Returns the volume of a single voxel in cubic millimeters (mm^3).
This returns the correct volume for sheared datasets and calculates fabs( inImg->getVoxelToWorldMatrix().det() ).
double SoSFMLImage::getVoxelVolumeInMilliliters | ( | ) |
Returns the volume of a single voxel in milliliters (ml).
This returns the correct volume for sheared datasets and calculates fabs( inImg->getVoxelToWorldMatrix().det() ) / 1000.
void SoSFMLImage::getWorldToVoxelMatrix | ( | double | mat[16] | ) |
Gets the WorldToVoxelMatrix as a double array (according to ML conventions).
void SoSFMLImage::getWorldToVoxelMatrix | ( | float | mat[16] | ) |
Gets the WorldToVoxelMatrix as a float array (according to ML conventions).
void SoSFMLImage::getWorldToVoxelMatrix | ( | SbMatrix & | matrix | ) |
Gets the WorldToVoxelMatrix as an Inventor float matrix (transposed w.r.t. ML).
void SoSFMLImage::getWorldToVoxelMatrix | ( | SbMatrixd & | matrix | ) |
Gets the WorldToVoxelMatrix as an Inventor double matrix (transposed w.r.t. ML).
|
static |
Initializes field class, setting up runtime type info.
bool SoSFMLImage::isChannelName | ( | MLint | n, |
const char * | name | ||
) |
Check whether the name of the n-th channel is the given name
.
bool SoSFMLImage::isValid | ( | ) |
Checks whether there is a valid image available.
bool SoSFMLImage::isVoxelInsideImage | ( | const SbVec3d & | voxelCoord | ) |
Checks whether the voxel coordinate is inside of the image extend.
bool SoSFMLImage::isVoxelInsideImage | ( | const SbVec3f & | voxelCoord | ) |
Checks whether the voxel coordinate is inside of the image extend.
bool SoSFMLImage::isVoxelInsideImage | ( | double | voxelX, |
double | voxelY, | ||
double | voxelZ | ||
) |
Checks whether the voxel coordinate (in doubles) is inside of the image extend.
void SoSFMLImage::mapVoxelToWorld | ( | const SbVec3d & | src, |
SbVec3d & | dst | ||
) |
Maps from voxel to world coordinate in double vectors.
void SoSFMLImage::mapVoxelToWorld | ( | const SbVec3f & | src, |
SbVec3f & | dst | ||
) |
Maps from voxel to world coordinate in float vectors.
void SoSFMLImage::mapVoxelToWorld | ( | double | voxelX, |
double | voxelY, | ||
double | voxelZ, | ||
double & | worldX, | ||
double & | worldY, | ||
double & | worldZ | ||
) |
Maps from voxel to world coordinate in double values.
void SoSFMLImage::mapVoxelToWorld | ( | float | voxelX, |
float | voxelY, | ||
float | voxelZ, | ||
float & | worldX, | ||
float & | worldY, | ||
float & | worldZ | ||
) |
Maps from voxel to world coordinate in float values.
void SoSFMLImage::mapWorldToVoxel | ( | const SbVec3d & | src, |
SbVec3d & | dst | ||
) |
Maps from world to voxel coordinate in double vectors.
void SoSFMLImage::mapWorldToVoxel | ( | const SbVec3f & | src, |
SbVec3f & | dst | ||
) |
Maps from world to voxel coordinate in float vectors.
void SoSFMLImage::mapWorldToVoxel | ( | double | worldX, |
double | worldY, | ||
double | worldZ, | ||
double & | voxelX, | ||
double & | voxelY, | ||
double & | voxelZ | ||
) |
Maps from world to voxel coordinate in double values.
void SoSFMLImage::mapWorldToVoxel | ( | float | worldX, |
float | worldY, | ||
float | worldZ, | ||
float & | voxelX, | ||
float & | voxelY, | ||
float & | voxelZ | ||
) |
Maps from world to voxel coordinate in float values.
|
override |
Required by Inventor but not used.
|
virtual |
Required by Inventor but not used.
|
override |
Forces a notification of a changed image.
This can be received by a field sensor. Typically, this is called implicitly when the internal ML field sensor is activated.
|
override |
Required by Inventor but not used.
|
protected |
Private data of the SoSFMLImage.
Definition at line 254 of file SoSFMLImage.h.