MeVisLab Scripting Reference
|
Public Types | |
enum | DataTypes { MLuint8Type = ::MLuint8Type , MLint8Type = ::MLint8Type , MLuint16Type = ::MLuint16Type , MLint16Type = ::MLint16Type , MLuint32Type = ::MLuint32Type , MLint32Type = ::MLint32Type , MLuint64Type = ::MLuint64Type , MLint64Type = ::MLint64Type , MLfloatType = ::MLfloatType , MLdoubleType = ::MLdoubleType , MLcomplexfType = ::MLComplexfType , MLcomplexdType = ::MLComplexdType , MLComplexfType = ::MLComplexfType , MLComplexdType = ::MLComplexdType , MLQuaternionfType = ::MLQuaternionfType , MLQuaterniondType = ::MLQuaterniondType , MLVector2fType = ::MLVector2fType , MLVector2dType = ::MLVector2dType , MLVector3fType = ::MLVector3fType , MLVector3dType = ::MLVector3dType , MLVector4fType = ::MLVector4fType , MLVector4dType = ::MLVector4dType , MLVector5fType = ::MLVector5fType , MLVector5dType = ::MLVector5dType , MLVector6fType = ::MLVector6fType , MLVector6dType = ::MLVector6dType , MLVector7fType = ::MLVector7fType , MLVector7dType = ::MLVector7dType , MLVector8fType = ::MLVector8fType , MLVector8dType = ::MLVector8dType , MLVector9fType = ::MLVector9fType , MLVector9dType = ::MLVector9dType , MLVector10fType = ::MLVector10fType , MLVector10dType = ::MLVector10dType , MLVector16fType = ::MLVector16fType , MLVector16dType = ::MLVector16dType , MLVector32fType = ::MLVector32fType , MLVector32dType = ::MLVector32dType , MLVector64fType = ::MLVector64fType , MLVector64dType = ::MLVector64dType , MLMatrix2fType = ::MLMatrix2fType , MLMatrix2dType = ::MLMatrix2dType , MLMatrix3fType = ::MLMatrix3fType , MLMatrix3dType = ::MLMatrix3dType , MLMatrix4fType = ::MLMatrix4fType , MLMatrix4dType = ::MLMatrix4dType , MLMatrix5fType = ::MLMatrix5fType , MLMatrix5dType = ::MLMatrix5dType , MLMatrix6fType = ::MLMatrix6fType , MLMatrix6dType = ::MLMatrix6dType } |
enum | Options { UseImageExtent = -4711 } |
Public Slots | |
Property read access | |
| |
QList< qint64 > | imageExtent () const |
QList< qint64 > | pageExtent () const |
int | dataType () const |
int | numPyDataType () const |
const char * | dataTypeName () const |
QList< double > | voxelSize () const |
double | voxelVolumeInCubicMillimeters () const |
double | voxelVolumeInMilliliters () const |
QVariantList | worldToVoxelMatrix () const |
QVariantList | voxelToWorldMatrix () const |
SbMatrixd | worldToVoxelMatrixInventor () const |
SbMatrixd | voxelToWorldMatrixInventor () const |
QList< double > | mapVoxelToWorld (QList< double > vector) const |
QList< double > | mapVoxelToWorld (double x, double y, double z) const |
QList< double > | mapWorldToVoxel (QList< double > vector) const |
QList< double > | mapWorldToVoxel (double x, double y, double z) const |
double | minVoxelValue () const |
double | maxVoxelValue () const |
QStringList | getCDimensionInfos () const |
QList< QDateTime > | getTDimensionInfos () const |
QStringList | getUDimensionInfos () const |
Image access | |
| |
PySubImage | getTile (const QList< qint64 > &pos, const QList< qint64 > &extent, int dataType=-2, double scale=1.0, double shift=0.) |
double | getInterpolatedValue (const QList< double > xyzPosition, qint64 c=0, qint64 t=0, qint64 u=0, double outsideFillValue=0) |
QPixmap | getSliceAsQPixmap (qint64 z=0, qint64 t=0, qint64 u=0) |
QImage | getSliceAsQImage (qint64 z=0, qint64 t=0, qint64 u=0) |
This class allows scripting read access to a ml::PagedImage.
It is available via MLABImageField::image().
Static datatypes via enum.
Additional options that can be used instead of image extent.
Enumerator | |
---|---|
UseImageExtent | special value that can be used when using getTile() |
|
slot |
Returns the data type as ML data type ID.
|
slot |
Returns the name of the current data type as string.
|
slot |
Returns information about C dimension.
|
slot |
Returns a trilinearly interpolated image value at a given voxel position (center of a voxel is 0.5,0.5,0.5).
This method can be used for random access, but should not be used to, e.g., resample a full dataset, since it has a much larger overhead compared to modules that do the resampling on pages. Values on the image border are filled with the nearest image values and values completely outside of the image are filled with outsideFillValue
.
|
slot |
Returns the selected slice as a QImage.
This returned image is either an RGB or an RGBA image, depending on the number of channels of the image. Only images with at least 3 color channels are supported, an empty image is returned otherwise.
|
slot |
Returns the selected slice as a QPixmap; see getSliceAsQImage for details.
|
slot |
Returns information about T dimension.
|
slot |
Returns the image tile defined by the box [pos,pos+extent-1] as a PySubImage, which is derived from NumPy's ndarray.
The ordering of the dimensions in pos and extent is (x,y,z,c,t,u). The returned image is an N dimensional image where N == len(extent). This way, if you request an image of extent (256,256), you will get a 2D image. If you request (256,256,3,1,1,1), you will get a 6D image, regardless of the size of 1 of the trailing dimensions. If pos or extent contain less than 6 dimensions, they are filled with 0 for pos
and 1 for extent
. If one of the values of extent contains the MLPagedImageWrapper::UseImageExtent enum, that value is filled with the image extent. If no data type is given, the data type of the input image is used. The data is stored in the ML Memory manager and is owned by the Python scripting engine, it will be automatically garbage collected when the reference to it is lost. Note: This method is only callable via Python scripting. Have a look at the PythonGetTileExample module and example network to see how getTile() is used.
|
slot |
Returns information about U dimension.
|
slot |
Returns the image extent in (x,y,z,c,t,u) order.
|
slot |
Transforms the given 3D input vector to world coordinates.
|
slot |
Transforms the given 3D input vector to world coordinates.
|
slot |
Transforms the given 3D input vector to voxel coordinates.
|
slot |
Transforms the given 3D input vector to voxel coordinates.
|
inlineslot |
Returns the maximum voxel value, which defines an upper bound to the values in the image data, not the really present max value.
|
inlineslot |
Returns the minimum voxel value, which defines a lower bound to the values in the image data, not the really present min value.
|
slot |
Returns the data type as numpy data type ID.
|
slot |
Returns the page extent in (x,y,z,c,t,u) order.
|
slot |
Returns the the voxelsize in (vx, vy, vz) order.
|
slot |
Returns the voxel to world matrix.
|
slot |
Returns the voxel to world matrix.
|
slot |
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() ).
|
slot |
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.
|
slot |
Returns the world to voxel matrix.
|
slot |
Returns the world to voxel matrix as an Inventor matrix.