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: | |
SbBool | readValue (SoInput *in) override |
required by Inventor but not used: | |
void | writeValue (SoOutput *out) const override |
required by Inventor but not used: | |
bool | isValid () |
checks if there is a valid image available | |
void | getSize (XVImageSize &size) |
gets the size of the image | |
void | getSize (int &x, int &y, int &z, int &c, int &t, int &u) |
gets the size of the image | |
void | getSize (int &x, int &y, int &z, int &c, int &t) |
gets the size of the image | |
void | getSize (int &x, int &y, int &z, int &c) |
gets the size of the image | |
void | getSize (int &x, int &y, int &z) |
gets the size of the image | |
void | getSize (int &x, int &y) |
gets the size of the image | |
void | getSize (MLint &x, MLint &y, MLint &z, MLint &c, MLint &t, MLint &u) |
gets the size of the image | |
void | getSize (MLint &x, MLint &y, MLint &z, MLint &c, MLint &t) |
gets the size of the image | |
void | getSize (MLint &x, MLint &y, MLint &z, MLint &c) |
gets the size of the image | |
void | getSize (MLint &x, MLint &y, MLint &z) |
gets the size of the image | |
void | getSize (MLint &x, MLint &y) |
gets the size of the image | |
void | getPageSize (XVImageSize &size) |
gets the ML page size of the image | |
MLint | getChannels () |
returns number of color channels | |
bool | isChannelName (MLint n, const char *name) |
check if the name of the n-th channel is the given name | |
MLint | getTimePoints () |
returns number of time points | |
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 pixel value) | |
void | getType (MLDataType &dtype) |
gets the type of the Image: Number of channels, data type as defined in mlDataTypes.h | |
void | getVoxelSize (float &x, float &y, float &z) |
returns the voxel size in floats | |
void | getVoxelSize (double &x, double &y, double &z) |
returns the voxel size in doubles | |
void | getVoxelSize (float &x, float &y) |
returns the voxel size in floats | |
void | getVoxelSize (double &x, double &y) |
returns the voxel size in doubles | |
double | getVoxelVolumeInCubicMillimeters () |
Returns the volume of a single voxel in cubic millimeters (mm3). | |
double | getVoxelVolumeInMilliliters () |
Returns the volume of a single voxel in milliliters (ml). | |
void | touch () override |
touch 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) | |
unsigned int | getSerialNumber () |
get serial number of current image | |
double | getMinValue () |
returns the statistical min value of the image | |
double | getMaxValue () |
returns the statistical max value of the image | |
const ml::ImagePropertyExtension * | getImagePropertyExtensionByType (const char *imagePropertyTypeClassName) |
Returns a pointer to a constant image property extension, or NULL if not available. | |
void | connectFromML (void *connector) |
connect to an ML output connector field | |
void | disconnectFromML () |
disconnect from an ML output connector field | |
void * | getConnector () |
Return current ML connector or NULL if not connected. | |
ml::PagedImage * | getPagedImage () |
Get access to the underlying ml::PagedImage. | |
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 | |
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 (and scales the data from srcMin/srcMax to dstMin/dstMax | |
bool | getTile6D (void *usrMem, MLDataType type, XVImageSize &pos, XVImageSize &size) |
returns the 6D Tile in the specified user memory with format type | |
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 (and scales the data from srcMin/srcMax to dstMin/dstMax | |
void | getVoxelToWorldMatrix (float mat[16]) |
get the VoxelToWorldMatrix as a float array (according to ML conventions) | |
void | getVoxelToWorldMatrix (double mat[16]) |
get the VoxelToWorldMatrix as a double array (according to ML conventions) | |
void | getVoxelToWorldMatrix (SbMatrix &matrix) |
get the VoxelToWorldMatrix as an Inventor float matrix (transposed w.r.t. ML) | |
void | getVoxelToWorldMatrix (SbMatrixd &matrix) |
get the VoxelToWorldMatrix as an Inventor double matrix (transposed w.r.t. ML) | |
void | getWorldToVoxelMatrix (float mat[16]) |
get the WorldToVoxelMatrix as a float array (according to ML conventions) | |
void | getWorldToVoxelMatrix (double mat[16]) |
get the WorldToVoxelMatrix as a double array (according to ML conventions) | |
void | getWorldToVoxelMatrix (SbMatrix &matrix) |
get the WorldToVoxelMatrix as an Inventor float matrix (transposed w.r.t. ML) | |
void | getWorldToVoxelMatrix (SbMatrixd &matrix) |
get the WorldToVoxelMatrix as an Inventor double matrix (transposed w.r.t. ML) | |
void | mapVoxelToWorld (const SbVec3f &src, SbVec3f &dst) |
map from Voxel to World coordinate in float vectors | |
void | mapVoxelToWorld (const SbVec3d &src, SbVec3d &dst) |
map from Voxel to World coordinate in double vectors | |
void | mapWorldToVoxel (const SbVec3f &src, SbVec3f &dst) |
map from World to Voxel coordinate in float vectors | |
void | mapWorldToVoxel (const SbVec3d &src, SbVec3d &dst) |
map from World to Voxel coordinate in double vectors | |
void | mapVoxelToWorld (float voxelX, float voxelY, float voxelZ, float &worldX, float &worldY, float &worldZ) |
map from Voxel to World coordinate in float values | |
void | mapVoxelToWorld (double voxelX, double voxelY, double voxelZ, double &worldX, double &worldY, double &worldZ) |
map from Voxel to World coordinate in double values | |
void | mapWorldToVoxel (float worldX, float worldY, float worldZ, float &voxelX, float &voxelY, float &voxelZ) |
map from World to Voxel coordinate in float values | |
void | mapWorldToVoxel (double worldX, double worldY, double worldZ, double &voxelX, double &voxelY, double &voxelZ) |
map from World to Voxel coordinate in double values | |
bool | isVoxelInsideImage (double voxelX, double voxelY, double voxelZ) |
checks if voxel coordinate (in doubles) is inside of the image extend | |
bool | isVoxelInsideImage (const SbVec3f &voxelCoord) |
checks if voxel coordinate is inside of the image extend | |
bool | isVoxelInsideImage (const SbVec3d &voxelCoord) |
checks if voxel coordinate is inside of the image extend | |
Static Public Member Functions | |
static void | initClass () |
Initializes field class, setting up runtime type info. | |
Protected Attributes | |
SoSFMLImagePrivate * | _p |
private data of the SoSFMLImage | |
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 a 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::disconnectFromML | ( | ) |
disconnect from an ML output connector field
MLint SoSFMLImage::getChannels | ( | ) |
returns number of color channels
void * SoSFMLImage::getConnector | ( | ) |
Return 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 max value of the image
double SoSFMLImage::getMinValue | ( | ) |
returns the statistical min value of the image
ml::PagedImage * SoSFMLImage::getPagedImage | ( | ) |
Get 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 (and 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 (and scales the data from srcMin/srcMax to dstMin/dstMax
get serial number of current image
The serial number is never equal to 0. The serial number is increased on each image change and can be used to find out if the image has changed, when you store a previous serial number and compare it to the current one. It is recommended to use a SoFieldSensor on this field instead of using the serial number.
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 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 pixel value)
returns the voxel size in doubles
get the VoxelToWorldMatrix as a double array (according to ML conventions)
get the VoxelToWorldMatrix as a float array (according to ML conventions)
get the VoxelToWorldMatrix as an Inventor float matrix (transposed w.r.t. ML)
get 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 (mm3).
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.
get the WorldToVoxelMatrix as a double array (according to ML conventions)
get the WorldToVoxelMatrix as a float array (according to ML conventions)
get the WorldToVoxelMatrix as an Inventor float matrix (transposed w.r.t. ML)
get the WorldToVoxelMatrix as an Inventor double matrix (transposed w.r.t. ML)
Initializes field class, setting up runtime type info.
check if the name of the n-th channel is the given name
bool SoSFMLImage::isValid | ( | ) |
checks if there is a valid image available
checks if voxel coordinate is inside of the image extend
checks if voxel coordinate is inside of the image extend
checks if voxel coordinate (in doubles) is inside of the image extend
map from Voxel to World coordinate in double vectors
map from Voxel to World coordinate in float vectors
void SoSFMLImage::mapVoxelToWorld | ( | double | voxelX, |
double | voxelY, | ||
double | voxelZ, | ||
double & | worldX, | ||
double & | worldY, | ||
double & | worldZ ) |
map from Voxel to World coordinate in double values
void SoSFMLImage::mapVoxelToWorld | ( | float | voxelX, |
float | voxelY, | ||
float | voxelZ, | ||
float & | worldX, | ||
float & | worldY, | ||
float & | worldZ ) |
map from Voxel to World coordinate in float values
map from World to Voxel coordinate in double vectors
map from World to Voxel coordinate in float vectors
void SoSFMLImage::mapWorldToVoxel | ( | double | worldX, |
double | worldY, | ||
double | worldZ, | ||
double & | voxelX, | ||
double & | voxelY, | ||
double & | voxelZ ) |
map from World to Voxel coordinate in double values
void SoSFMLImage::mapWorldToVoxel | ( | float | worldX, |
float | worldY, | ||
float | worldZ, | ||
float & | voxelX, | ||
float & | voxelY, | ||
float & | voxelZ ) |
map from World to Voxel coordinate in float values
|
override |
touch 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)
|
protected |
private data of the SoSFMLImage
Definition at line 254 of file SoSFMLImage.h.