MeVisLab Toolbox Reference
SoSFMLImage Class 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>

Inheritance diagram for SoSFMLImage:

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 if 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 number of color channels More...
 
bool isChannelName (MLint n, const char *name)
 check if the name of the n-th channel is the given name More...
 
MLint getTimePoints ()
 returns 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 pixel 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)
 returns the voxel size in floats More...
 
void getVoxelSize (double &x, double &y, double &z)
 returns the voxel size in doubles More...
 
void getVoxelSize (float &x, float &y)
 returns the voxel size in floats More...
 
void getVoxelSize (double &x, double &y)
 returns the voxel size in doubles More...
 
double getVoxelVolumeInCubicMillimeters ()
 Returns the volume of a single voxel in cubic millimeters (mm3). More...
 
double getVoxelVolumeInMilliliters ()
 Returns the volume of a single voxel in milliliters (ml). More...
 
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) More...
 
unsigned int getSerialNumber ()
 get serial number of current image More...
 
double getMinValue ()
 returns the statistical min value of the image More...
 
double getMaxValue ()
 returns the statistical max value of the image More...
 
const ml::ImagePropertyExtensiongetImagePropertyExtensionByType (const char *imagePropertyTypeClassName)
 Returns a pointer to a constant image property extension, or NULL if not available. More...
 
void connectFromML (void *connector)
 connect to an ML output connector field More...
 
void disconnectFromML ()
 disconnect from an ML output connector field More...
 
void * getConnector ()
 Return current ML connector or NULL if not connected. More...
 
ml::PagedImagegetPagedImage ()
 Get 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 (and scales the data from srcMin/srcMax to dstMin/dstMax 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 (and scales the data from srcMin/srcMax to dstMin/dstMax More...
 
void getVoxelToWorldMatrix (float mat[16])
 get the VoxelToWorldMatrix as a float array (according to ML conventions) More...
 
void getVoxelToWorldMatrix (double mat[16])
 get the VoxelToWorldMatrix as a double array (according to ML conventions) More...
 
void getVoxelToWorldMatrix (SbMatrix &matrix)
 get the VoxelToWorldMatrix as an Inventor float matrix (transposed w.r.t. ML) More...
 
void getVoxelToWorldMatrix (SbMatrixd &matrix)
 get the VoxelToWorldMatrix as an Inventor double matrix (transposed w.r.t. ML) More...
 
void getWorldToVoxelMatrix (float mat[16])
 get the WorldToVoxelMatrix as a float array (according to ML conventions) More...
 
void getWorldToVoxelMatrix (double mat[16])
 get the WorldToVoxelMatrix as a double array (according to ML conventions) More...
 
void getWorldToVoxelMatrix (SbMatrix &matrix)
 get the WorldToVoxelMatrix as an Inventor float matrix (transposed w.r.t. ML) More...
 
void getWorldToVoxelMatrix (SbMatrixd &matrix)
 get the WorldToVoxelMatrix as an Inventor double matrix (transposed w.r.t. ML) More...
 
void mapVoxelToWorld (const SbVec3f &src, SbVec3f &dst)
 map from Voxel to World coordinate in float vectors More...
 
void mapVoxelToWorld (const SbVec3d &src, SbVec3d &dst)
 map from Voxel to World coordinate in double vectors More...
 
void mapWorldToVoxel (const SbVec3f &src, SbVec3f &dst)
 map from World to Voxel coordinate in float vectors More...
 
void mapWorldToVoxel (const SbVec3d &src, SbVec3d &dst)
 map from World to Voxel coordinate in double vectors More...
 
void mapVoxelToWorld (float voxelX, float voxelY, float voxelZ, float &worldX, float &worldY, float &worldZ)
 map from Voxel to World coordinate in float values More...
 
void mapVoxelToWorld (double voxelX, double voxelY, double voxelZ, double &worldX, double &worldY, double &worldZ)
 map from Voxel to World coordinate in double values More...
 
void mapWorldToVoxel (float worldX, float worldY, float worldZ, float &voxelX, float &voxelY, float &voxelZ)
 map from World to Voxel coordinate in float values More...
 
void mapWorldToVoxel (double worldX, double worldY, double worldZ, double &voxelX, double &voxelY, double &voxelZ)
 map from World to Voxel coordinate in double values More...
 
bool isVoxelInsideImage (double voxelX, double voxelY, double voxelZ)
 checks if voxel coordinate (in doubles) is inside of the image extend More...
 
bool isVoxelInsideImage (const SbVec3f &voxelCoord)
 checks if voxel coordinate is inside of the image extend More...
 
bool isVoxelInsideImage (const SbVec3d &voxelCoord)
 checks if 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...
 

Detailed Description

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.

Member Function Documentation

◆ connectFromML()

void SoSFMLImage::connectFromML ( void *  connector)

connect to an ML output connector field

◆ disconnectFromML()

void SoSFMLImage::disconnectFromML ( )

disconnect from an ML output connector field

◆ getChannels()

MLint SoSFMLImage::getChannels ( )

returns number of color channels

◆ getConnector()

void* SoSFMLImage::getConnector ( )

Return current ML connector or NULL if not connected.

◆ getImagePropertyExtensionByType()

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.

◆ getMaxValue()

double SoSFMLImage::getMaxValue ( )

returns the statistical max value of the image

◆ getMinValue()

double SoSFMLImage::getMinValue ( )

returns the statistical min value of the image

◆ getPagedImage()

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.

◆ getPageSize()

void SoSFMLImage::getPageSize ( XVImageSize size)

gets the ML page size of the image

◆ getScaledTile3D()

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

◆ getScaledTile6D()

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

◆ getSerialNumber()

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.

◆ getSize() [1/11]

void SoSFMLImage::getSize ( int &  x,
int &  y 
)

gets the size of the image

◆ getSize() [2/11]

void SoSFMLImage::getSize ( int &  x,
int &  y,
int &  z 
)

gets the size of the image

◆ getSize() [3/11]

void SoSFMLImage::getSize ( int &  x,
int &  y,
int &  z,
int &  c 
)

gets the size of the image

◆ getSize() [4/11]

void SoSFMLImage::getSize ( int &  x,
int &  y,
int &  z,
int &  c,
int &  t 
)

gets the size of the image

◆ getSize() [5/11]

void SoSFMLImage::getSize ( int &  x,
int &  y,
int &  z,
int &  c,
int &  t,
int &  u 
)

gets the size of the image

◆ getSize() [6/11]

void SoSFMLImage::getSize ( MLint x,
MLint y 
)

gets the size of the image

◆ getSize() [7/11]

void SoSFMLImage::getSize ( MLint x,
MLint y,
MLint z 
)

gets the size of the image

◆ getSize() [8/11]

void SoSFMLImage::getSize ( MLint x,
MLint y,
MLint z,
MLint c 
)

gets the size of the image

◆ getSize() [9/11]

void SoSFMLImage::getSize ( MLint x,
MLint y,
MLint z,
MLint c,
MLint t 
)

gets the size of the image

◆ getSize() [10/11]

void SoSFMLImage::getSize ( MLint x,
MLint y,
MLint z,
MLint c,
MLint t,
MLint u 
)

gets the size of the image

◆ getSize() [11/11]

void SoSFMLImage::getSize ( XVImageSize size)

gets the size of the image

◆ getTile3D()

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

◆ getTile6D()

bool SoSFMLImage::getTile6D ( void *  usrMem,
MLDataType  type,
XVImageSize pos,
XVImageSize size 
)

returns the 6D Tile in the specified user memory with format type

◆ getTimePoints()

MLint SoSFMLImage::getTimePoints ( )

returns number of time points

◆ getType() [1/2]

void SoSFMLImage::getType ( MLDataType dtype)

gets the type of the Image: Number of channels, data type as defined in mlDataTypes.h

◆ getType() [2/2]

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)

◆ getVoxelSize() [1/4]

void SoSFMLImage::getVoxelSize ( double &  x,
double &  y 
)

returns the voxel size in doubles

◆ getVoxelSize() [2/4]

void SoSFMLImage::getVoxelSize ( double &  x,
double &  y,
double &  z 
)

returns the voxel size in doubles

◆ getVoxelSize() [3/4]

void SoSFMLImage::getVoxelSize ( float &  x,
float &  y 
)

returns the voxel size in floats

◆ getVoxelSize() [4/4]

void SoSFMLImage::getVoxelSize ( float &  x,
float &  y,
float &  z 
)

returns the voxel size in floats

◆ getVoxelToWorldMatrix() [1/4]

void SoSFMLImage::getVoxelToWorldMatrix ( double  mat[16])

get the VoxelToWorldMatrix as a double array (according to ML conventions)

◆ getVoxelToWorldMatrix() [2/4]

void SoSFMLImage::getVoxelToWorldMatrix ( float  mat[16])

get the VoxelToWorldMatrix as a float array (according to ML conventions)

◆ getVoxelToWorldMatrix() [3/4]

void SoSFMLImage::getVoxelToWorldMatrix ( SbMatrix &  matrix)

get the VoxelToWorldMatrix as an Inventor float matrix (transposed w.r.t. ML)

◆ getVoxelToWorldMatrix() [4/4]

void SoSFMLImage::getVoxelToWorldMatrix ( SbMatrixd &  matrix)

get the VoxelToWorldMatrix as an Inventor double matrix (transposed w.r.t. ML)

◆ getVoxelVolumeInCubicMillimeters()

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() ).

◆ getVoxelVolumeInMilliliters()

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.

◆ getWorldToVoxelMatrix() [1/4]

void SoSFMLImage::getWorldToVoxelMatrix ( double  mat[16])

get the WorldToVoxelMatrix as a double array (according to ML conventions)

◆ getWorldToVoxelMatrix() [2/4]

void SoSFMLImage::getWorldToVoxelMatrix ( float  mat[16])

get the WorldToVoxelMatrix as a float array (according to ML conventions)

◆ getWorldToVoxelMatrix() [3/4]

void SoSFMLImage::getWorldToVoxelMatrix ( SbMatrix &  matrix)

get the WorldToVoxelMatrix as an Inventor float matrix (transposed w.r.t. ML)

◆ getWorldToVoxelMatrix() [4/4]

void SoSFMLImage::getWorldToVoxelMatrix ( SbMatrixd &  matrix)

get the WorldToVoxelMatrix as an Inventor double matrix (transposed w.r.t. ML)

◆ initClass()

static void SoSFMLImage::initClass ( )
static

Initializes field class, setting up runtime type info.

◆ isChannelName()

bool SoSFMLImage::isChannelName ( MLint  n,
const char *  name 
)

check if the name of the n-th channel is the given name

◆ isValid()

bool SoSFMLImage::isValid ( )

checks if there is a valid image available

◆ isVoxelInsideImage() [1/3]

bool SoSFMLImage::isVoxelInsideImage ( const SbVec3d &  voxelCoord)

checks if voxel coordinate is inside of the image extend

◆ isVoxelInsideImage() [2/3]

bool SoSFMLImage::isVoxelInsideImage ( const SbVec3f &  voxelCoord)

checks if voxel coordinate is inside of the image extend

◆ isVoxelInsideImage() [3/3]

bool SoSFMLImage::isVoxelInsideImage ( double  voxelX,
double  voxelY,
double  voxelZ 
)

checks if voxel coordinate (in doubles) is inside of the image extend

◆ mapVoxelToWorld() [1/4]

void SoSFMLImage::mapVoxelToWorld ( const SbVec3d &  src,
SbVec3d &  dst 
)

map from Voxel to World coordinate in double vectors

◆ mapVoxelToWorld() [2/4]

void SoSFMLImage::mapVoxelToWorld ( const SbVec3f &  src,
SbVec3f &  dst 
)

map from Voxel to World coordinate in float vectors

◆ mapVoxelToWorld() [3/4]

void SoSFMLImage::mapVoxelToWorld ( double  voxelX,
double  voxelY,
double  voxelZ,
double &  worldX,
double &  worldY,
double &  worldZ 
)

map from Voxel to World coordinate in double values

◆ mapVoxelToWorld() [4/4]

void SoSFMLImage::mapVoxelToWorld ( float  voxelX,
float  voxelY,
float  voxelZ,
float &  worldX,
float &  worldY,
float &  worldZ 
)

map from Voxel to World coordinate in float values

◆ mapWorldToVoxel() [1/4]

void SoSFMLImage::mapWorldToVoxel ( const SbVec3d &  src,
SbVec3d &  dst 
)

map from World to Voxel coordinate in double vectors

◆ mapWorldToVoxel() [2/4]

void SoSFMLImage::mapWorldToVoxel ( const SbVec3f &  src,
SbVec3f &  dst 
)

map from World to Voxel coordinate in float vectors

◆ mapWorldToVoxel() [3/4]

void SoSFMLImage::mapWorldToVoxel ( double  worldX,
double  worldY,
double  worldZ,
double &  voxelX,
double &  voxelY,
double &  voxelZ 
)

map from World to Voxel coordinate in double values

◆ mapWorldToVoxel() [4/4]

void SoSFMLImage::mapWorldToVoxel ( float  worldX,
float  worldY,
float  worldZ,
float &  voxelX,
float &  voxelY,
float &  voxelZ 
)

map from World to Voxel coordinate in float values

◆ readValue()

SbBool SoSFMLImage::readValue ( SoInput *  in)
override

required by Inventor but not used:

◆ setValue()

virtual void SoSFMLImage::setValue ( )
virtual

required by Inventor but not used:

◆ touch()

void SoSFMLImage::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)

◆ writeValue()

void SoSFMLImage::writeValue ( SoOutput *  out) const
override

required by Inventor but not used:

Member Data Documentation

◆ _p

SoSFMLImagePrivate* SoSFMLImage::_p
protected

private data of the SoSFMLImage

Definition at line 254 of file SoSFMLImage.h.


The documentation for this class was generated from the following file: