13 #ifndef SO_SFMLIMAGE_H
14 #define SO_SFMLIMAGE_H
20 #include <ThirdPartyWarningsDisable.h>
21 #include <Inventor/fields/SoSubField.h>
22 #include <Inventor/SbLinear.h>
23 #include <Inventor/SbLineard.h>
24 #include <ThirdPartyWarningsRestore.h>
49 class SoSFMLImagePrivate;
93 void getSize(
int &x,
int &y,
int &z,
int &c,
int &t,
int &u);
95 void getSize(
int &x,
int &y,
int &z,
int &c,
int &t);
97 void getSize(
int &x,
int &y,
int &z,
int &c);
191 double srcMin,
double srcMax,
double dstMin,
double dstMax);
201 double srcMin,
double srcMax,
double dstMin,
double dstMax);
231 float &worldX,
float &worldY,
float &worldZ);
234 double &worldX,
double &worldY,
double &worldZ);
239 float &voxelX,
float &voxelY,
float &voxelZ);
242 double &voxelX,
double &voxelY,
double &voxelZ);
254 SoSFMLImagePrivate*
_p;
#define INVENTORWRAPPER_API
Library initialization and export macros for platform independecy of project.
The SoSFMLImage field is the interface used by Inventor Nodes to access image data (in the current im...
double getMaxValue()
Returns the statistical maximum value of the image.
void getSize(MLint &x, MLint &y, MLint &z)
Gets the size of the image.
void getVoxelSize(double &x, double &y, double &z)
Gets the voxel size in doubles.
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.
void getVoxelSize(double &x, double &y)
Gets the voxel size in doubles.
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.
double getMinValue()
Returns the statistical minimum value of the image.
void getVoxelSize(float &x, float &y, float &z)
Gets the voxel size in floats.
bool isVoxelInsideImage(double voxelX, double voxelY, double voxelZ)
Checks whether the voxel coordinate (in doubles) is inside of the image extend.
void mapVoxelToWorld(float voxelX, float voxelY, float voxelZ, float &worldX, float &worldY, float &worldZ)
Maps from voxel to world coordinate in float values.
void getSize(int &x, int &y)
Gets the size of the image.
virtual void setValue()
Required by Inventor but not used.
void getSize(int &x, int &y, int &z)
Gets the size of the image.
unsigned int getSerialNumber()
Returns serial number of current image.
void getVoxelToWorldMatrix(SbMatrixd &matrix)
Gets the VoxelToWorldMatrix as an Inventor double matrix (transposed w.r.t. ML).
void getVoxelToWorldMatrix(float mat[16])
Gets the VoxelToWorldMatrix as a float array (according to ML conventions).
void mapWorldToVoxel(double worldX, double worldY, double worldZ, double &voxelX, double &voxelY, double &voxelZ)
Maps from world to voxel coordinate in double values.
void connectFromML(void *connector)
Connects to an ML output connector field.
void touch() override
Forces a notification of a changed image.
void getWorldToVoxelMatrix(float mat[16])
Gets the WorldToVoxelMatrix as a float array (according to ML conventions).
double getVoxelVolumeInCubicMillimeters()
Returns the volume of a single voxel in cubic millimeters (mm^3).
void writeValue(SoOutput *out) const override
Required by Inventor but not used.
SoSFMLImagePrivate * _p
Private data of the SoSFMLImage.
void getWorldToVoxelMatrix(double mat[16])
Gets the WorldToVoxelMatrix as a double array (according to ML conventions).
void getSize(int &x, int &y, int &z, int &c)
Gets the size of the image.
void getSize(XVImageSize &size)
Gets the size of the image.
ml::PagedImage * getPagedImage()
Returns access to the underlying ml::PagedImage.
void mapWorldToVoxel(float worldX, float worldY, float worldZ, float &voxelX, float &voxelY, float &voxelZ)
Maps from world to voxel coordinate in float values.
static void initClass()
Initializes field class, setting up runtime type info.
bool isChannelName(MLint n, const char *name)
Check whether the name of the n-th channel is the given name.
bool getTile6D(void *usrMem, MLDataType type, XVImageSize &pos, XVImageSize &size)
Returns the 6D Tile in the specified user memory with format type.
bool isVoxelInsideImage(const SbVec3d &voxelCoord)
Checks whether the voxel coordinate is inside of the image extend.
void getPageSize(XVImageSize &size)
Gets the ML page size of the image.
bool isValid()
Checks whether there is a valid image available.
void getWorldToVoxelMatrix(SbMatrixd &matrix)
Gets the WorldToVoxelMatrix as an Inventor double matrix (transposed w.r.t. ML).
void getType(MLDataType &dtype)
Gets the type of the Image: number of channels, data type as defined in mlDataTypes....
double getVoxelVolumeInMilliliters()
Returns the volume of a single voxel in milliliters (ml).
void getVoxelToWorldMatrix(SbMatrix &matrix)
Gets the VoxelToWorldMatrix as an Inventor float matrix (transposed w.r.t. ML).
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.
void getWorldToVoxelMatrix(SbMatrix &matrix)
Gets the WorldToVoxelMatrix as an Inventor float matrix (transposed w.r.t. ML).
void getSize(MLint &x, MLint &y, MLint &z, MLint &c, MLint &t, MLint &u)
Gets the size of the image.
void getVoxelToWorldMatrix(double mat[16])
Gets the VoxelToWorldMatrix as a double array (according to ML conventions).
void mapVoxelToWorld(const SbVec3f &src, SbVec3f &dst)
Maps from voxel to world coordinate in float vectors.
SbBool readValue(SoInput *in) override
Required by Inventor but not used.
MLint getChannels()
Returns the number of color channels.
void getSize(MLint &x, MLint &y)
Gets the size of the image.
bool isVoxelInsideImage(const SbVec3f &voxelCoord)
Checks whether the voxel coordinate is inside of the image extend.
void getSize(int &x, int &y, int &z, int &c, int &t, int &u)
Gets the size of the image.
void mapVoxelToWorld(double voxelX, double voxelY, double voxelZ, double &worldX, double &worldY, double &worldZ)
Maps from voxel to world coordinate in double values.
void mapWorldToVoxel(const SbVec3d &src, SbVec3d &dst)
Maps from world to voxel coordinate in double vectors.
void getVoxelSize(float &x, float &y)
Gets the voxel size in floats.
void getSize(MLint &x, MLint &y, MLint &z, MLint &c, MLint &t)
Gets the size 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 getType(MLDataType &dtype, size_t &dsize)
Gets the type of the Image: number of channels, data type as defined in mlDataTypes....
void mapWorldToVoxel(const SbVec3f &src, SbVec3f &dst)
Maps from world to voxel coordinate in float vectors.
void * getConnector()
Returns current ML connector or NULL if not connected.
MLint getTimePoints()
Returns the number of time points.
void getSize(MLint &x, MLint &y, MLint &z, MLint &c)
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 disconnectFromML()
Disconnects from an ML output connector field.
void mapVoxelToWorld(const SbVec3d &src, SbVec3d &dst)
Maps from voxel to world coordinate in double vectors.
SoSFMLImage - field interface to ML images and related classes.
INVENTORWRAPPER_API void print()
Prints the size to stdout.
XVImageSize()
Creates size object with size 0.
MLint x
Public accessible integer sizes.
XVImageSize(MLint xp, MLint yp, MLint zp, MLint cp, MLint tp, MLint up)
Creates size object with given sizes.
XVImageSize(MLint n)
Creates size object with size n on all components.
Base class from which one can derive own image properties.
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
MLint32 MLDataType
MLDataType.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...