MeVisLabToolboxReference
|
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: | |
virtual int | readValue (SoInput *in) |
required by Inventor but not used: | |
virtual void | writeValue (SoOutput *out) const |
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 | getPageSize (XVImageSize &size) |
gets the ML page size of the image | |
int | getChannels () |
returns number of color channels | |
int | 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 | |
void | getVoxelSize (float &x, float &y) |
returns the voxel size | |
void | touch () |
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, int x, int y, int z, int nx, int ny, int nz) |
returns the 3D Tile in the specified user memory with format type | |
bool | getScaledTile3D (void *usrMem, MLDataType type, int x, int y, int z, int nx, int ny, int 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 (SbMatrix &matrix) |
get the VoxelToWorldMatrix as an Inventor matrix (transposed w.r.t. ML) | |
void | getWorldToVoxelMatrix (float mat[16]) |
get the WorldToVoxelMatrix as a float array (according to ML conventions) | |
void | getWorldToVoxelMatrix (SbMatrix &matrix) |
get the WorldToVoxelMatrix as an Inventor matrix (transposed w.r.t. ML) | |
void | mapVoxelToWorld (const SbVec3f &src, SbVec3f &dst) |
map from Voxel to World coordinate | |
void | mapWorldToVoxel (const SbVec3f &src, SbVec3f &dst) |
map from World to Voxel coordinate | |
void | mapVoxelToWorld (float voxelX, float voxelY, float voxelZ, float &worldX, float &worldY, float &worldZ) |
map from Voxel to World coordinate | |
void | mapWorldToVoxel (float worldX, float worldY, float worldZ, float &voxelX, float &voxelY, float &voxelZ) |
map from World to Voxel coordinate | |
bool | isVoxelInsideImage (float voxelX, float voxelY, float voxelZ) |
checks if voxel coordinate is inside of the image extend | |
bool | isVoxelInsideImage (const SbVec3f &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 71 of file SoSFMLImage.h.
void SoSFMLImage::connectFromML | ( | void * | connector | ) |
connect to an ML output connector field
void SoSFMLImage::disconnectFromML | ( | ) |
disconnect from an ML output connector field
int 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, | ||
int | x, | ||
int | y, | ||
int | z, | ||
int | nx, | ||
int | ny, | ||
int | 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
unsigned int SoSFMLImage::getSerialNumber | ( | ) |
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.
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 | ||
) |
gets the size of the image
void SoSFMLImage::getSize | ( | int & | x, |
int & | y | ||
) |
gets the size of the image
void SoSFMLImage::getSize | ( | XVImageSize & | size | ) |
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
bool SoSFMLImage::getTile3D | ( | void * | usrMem, |
MLDataType | type, | ||
int | x, | ||
int | y, | ||
int | z, | ||
int | nx, | ||
int | ny, | ||
int | 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
int 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)
void SoSFMLImage::getVoxelSize | ( | float & | x, |
float & | y, | ||
float & | z | ||
) |
returns the voxel size
void SoSFMLImage::getVoxelSize | ( | float & | x, |
float & | y | ||
) |
returns the voxel size
void SoSFMLImage::getVoxelToWorldMatrix | ( | float | mat[16] | ) |
get the VoxelToWorldMatrix as a float array (according to ML conventions)
void SoSFMLImage::getVoxelToWorldMatrix | ( | SbMatrix & | matrix | ) |
get the VoxelToWorldMatrix as an Inventor matrix (transposed w.r.t. ML)
void SoSFMLImage::getWorldToVoxelMatrix | ( | float | mat[16] | ) |
get the WorldToVoxelMatrix as a float array (according to ML conventions)
void SoSFMLImage::getWorldToVoxelMatrix | ( | SbMatrix & | matrix | ) |
get the WorldToVoxelMatrix as an Inventor matrix (transposed w.r.t. ML)
static void SoSFMLImage::initClass | ( | ) | [static] |
Initializes field class, setting up runtime type info.
bool SoSFMLImage::isValid | ( | ) |
checks if there is a valid image available
bool SoSFMLImage::isVoxelInsideImage | ( | float | voxelX, |
float | voxelY, | ||
float | voxelZ | ||
) |
checks if voxel coordinate is inside of the image extend
bool SoSFMLImage::isVoxelInsideImage | ( | const SbVec3f & | voxelCoord | ) |
checks if voxel coordinate is inside of the image extend
void SoSFMLImage::mapVoxelToWorld | ( | const SbVec3f & | src, |
SbVec3f & | dst | ||
) |
map from Voxel to World coordinate
void SoSFMLImage::mapVoxelToWorld | ( | float | voxelX, |
float | voxelY, | ||
float | voxelZ, | ||
float & | worldX, | ||
float & | worldY, | ||
float & | worldZ | ||
) |
map from Voxel to World coordinate
void SoSFMLImage::mapWorldToVoxel | ( | const SbVec3f & | src, |
SbVec3f & | dst | ||
) |
map from World to Voxel coordinate
void SoSFMLImage::mapWorldToVoxel | ( | float | worldX, |
float | worldY, | ||
float | worldZ, | ||
float & | voxelX, | ||
float & | voxelY, | ||
float & | voxelZ | ||
) |
map from World to Voxel coordinate
virtual int SoSFMLImage::readValue | ( | SoInput * | in | ) | [virtual] |
required by Inventor but not used:
virtual void SoSFMLImage::setValue | ( | ) | [virtual] |
required by Inventor but not used:
void SoSFMLImage::touch | ( | ) |
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)
virtual void SoSFMLImage::writeValue | ( | SoOutput * | out | ) | const [virtual] |
required by Inventor but not used:
SoSFMLImagePrivate* SoSFMLImage::_p [protected] |
private data of the SoSFMLImage
Definition at line 209 of file SoSFMLImage.h.