|
MeVisLab Scripting Reference
|
#include <mlabImageField.h>
Inherits MLABField.
Public Slots | |
Scripting access. | |
| |
| quint64 | usedPages () |
| quint64 | usedMemImg () |
| void | clearPages () |
| void | clearMemImg () |
| void | clear () |
| bool | isValid () |
| int | sizeX () |
| int | sizeY () |
| int | sizeZ () |
| int | sizeC () |
| int | sizeT () |
| int | sizeU () |
| QVariantList | size3D () |
| QVariantList | size6D () |
| const char * | dataType () |
| QVariantList | worldToVoxelMatrix () |
| SbMatrixd | worldToVoxelMatrixInventor () |
| QVariantList | voxelToWorldMatrix () |
| SbMatrixd | voxelToWorldMatrixInventor () |
| QVariantList | pageSize6D () |
| double | voxelSizeX () |
| double | voxelSizeY () |
| double | voxelSizeZ () |
| QVariantList | voxelSize () |
| double | voxelVolumeInCubicMillimeters () |
| double | voxelVolumeInMilliliters () |
| QVariantList | mapWorldToVoxel (const QVariantList &vector) |
| SbVec3d | mapWorldToVoxel (const SbVec3d &vector) |
| QVariantList | mapVoxelToWorld (const QVariantList &vector) |
| SbVec3d | mapVoxelToWorld (const SbVec3d &vector) |
| double | minValue () |
| double | maxValue () |
DICOM Tag access. | |
| |
| QString | getDicomTagValueByName (const QString &name) |
| QString | getDicomTagValueByKey (const QString &name) |
| QMap< QString, QVariant > | getDicomTagByName (const QString &name) |
| QMap< QString, QVariant > | getDicomTagByKey (const QString &name) |
| MLABDicomTree * | getDicomTree () |
| MLABDicomTag * | getFrameSpecificDicomTag (const QString &name, int z, int t=0, int u=0) |
| MLABDicomTag * | getFrameSpecificDicomTagById (int group, int element, int z, int t=0, int u=0) |
| MLABDicomTag * | getSharedDicomTag (const QString &name) |
| MLABDicomTag * | getSharedDicomTagById (int group, int element) |
| MLPagedImageWrapper * | image () |
| QObject * | object () |
Public Slots inherited from MLABField | |
| bool | isInventorField () |
| bool | isMLField () |
| QString | getType () const |
| QString | getName () const |
| virtual QString | stringValue () |
| virtual QString | persistentStringValue () |
| virtual void | setPersistentStringValue (const QString &value) |
| QString | truncatedStringValue (int maxChars=80) |
| MLABFieldOwner * | owner () |
| MLABField * | connectedField () |
| MLABField * | inputField () |
| bool | isConnected () |
| bool | isConnectedToFieldInSameNetwork () |
| int | outputCount () |
| MLABField * | outputField (int index) |
| QList< MLABField * > | outputFields () |
| bool | connectFrom (MLABField *field) |
| void | disconnect () |
| void | disconnectOutputs () |
| void | disconnectAll () |
| bool | connectFromUndoable (MLABField *field) |
| virtual bool | isConnectionPossible (MLABField *field) |
| bool | isConnectionInSameNetworkPossible (MLABField *field) |
| bool | isInSameNetwork (MLABField *field) |
| virtual QString | toolTipInfo () |
| void | setPriority (int aPriority) |
| int | priority () |
| void | setProxy (bool flag) |
| bool | isProxy () |
| void | setComment (const QString &comment) |
| QString | comment () |
| void | setTitle (const QString &title) |
| QString | title () |
| QString | fullName () const |
| bool | isHidden () |
| void | setHidden (bool flag) |
| bool | isIgnored () |
| void | setIgnored (bool flag) |
| bool | isFilePath () |
| void | setIsFilePath (bool flag) |
| bool | isInterfaceField () |
| bool | isParameterField () |
| bool | isInput () |
| bool | isOutput () |
| bool | isInOut () |
| QString | infoString () |
| bool | isPersistent () const |
| bool | isEditable () const |
| bool | triggersLoading () const |
| void | setTriggersLoading (bool flag) |
Signals | |
| void | valueChanged () |
Public Member Functions | |
| void | setStringValue (const QString &) override |
| QString | stringValueForProfiling () override |
| void | touch () override |
A field containing an image.
This field offers various methods to access the image size, type, voxel size, and to map between world and voxel coordinates.
Internally this field contains a ML Input/OutputConnector or SoSFMLImage. It can also be a proxy field that forwards all calls to the internal image fields of a MacroModule and performs some special actions in connect and disconnect (connecting ML to Inventor Fields via multiple proxies, etc.).
|
slot |
Clears all ML memory.
|
slot |
Clears ML memory for memory images.
|
slot |
Clears ML memory for paged images.
|
slot |
Returns the data type as a string (as in mlDataTypes.h MLNameFromDataType()); undefined if the image is invalid.
|
slot |
Returns a map that contains information on the tag.
(See getDicomTagByName()) for details.)
|
slot |
Returns a map that contains information about the tag.
The tag is returned as a dictionary with the following keys: If the 'valid' key is set to '1', the tag was found and the following keys are set:
true, not set otherwisetrue, not set otherwiseExample:
This is a legacy interface and it is probably easier to call MLABDicomTree::getTag() on the return value of getDicomTree().
|
slot |
Returns the string value of a DICOM tag, name is given as key (group,element) with AT naming conventions.
Returns an empty string if the tag is not present.
Example:
|
slot |
Returns the string value of a DICOM tag or an empty string if the tag is not present.
Example:
|
slot |
Returns the DICOM tree of the current image (or NULL if not existing).
|
slot |
Returns the DICOM tag specific for the given slice (by name).
This might also return tags from within the PerFrameFunctionalGroupsSequence of enhanced multi-frame DICOM data.
|
slot |
Returns the DICOM tag specific for the given slice (by group and element ID).
This might also return tags from within the PerFrameFunctionalGroupsSequence of enhanced multi-frame DICOM data.
|
slot |
Returns a DICOM tag shared by all slices (by name).
This might also return tags from within the SharedFunctionalGroupsSequence of enhanced multi-frame DICOM data.
|
slot |
Returns a DICOM tag shared by all slices (by group and element ID).
This might also return tags from within the SharedFunctionalGroupsSequence of enhanced multi-frame DICOM data.
|
slot |
Get access to the extended ML image API (the returned object is either a MLPagedImageWrapper or NULL).
This method only returns an image if the underlying ML image is a valid image. In case of handleInput() redirection, this might also be a DummyImage, you can detect this with isGlobalDummyImage(). NOTE: The returned object is automatically set to NULL when the input image changes, thus you should not keep a reference to it in Python, instead ask this field for image() whenever you need access to the image.
|
slot |
Returns whether there is a valid image available.
|
slot |
Maps the vector from voxel to world coordinates of the current image.
| vector | is set as an array with three double values. |
|
slot |
The same for the Inventor vector type SbVec3d.
|
slot |
Maps the vector from world to voxel coordinates of the current image.
| vector | is set as an array with three double values. |
Scripting example:
|
slot |
The same for the Inventor vector type SbVec3d.
Use this import to use SbVec3d:
|
slot |
Returns the maximum value of the image (may not be the real maximum value of the data).
|
slot |
Returns the minimum value of the image (may not be the real minimum value of the data).
|
inlineslot |
See image().
|
slot |
Returns the page size.
|
inlineoverridevirtual |
Sets the value of the field as a string value.
Reimplemented from MLABField.
|
slot |
|
slot |
Returns the size as an array with 6 int values.
Scripting example:
|
slot |
Returns the c size in voxels.
|
slot |
Returns the t size in voxels.
|
slot |
Returns the u size in voxels.
|
slot |
Returns the x size in voxels.
|
slot |
Returns the y size in voxels.
|
slot |
Returns the z size in voxels.
|
inlineoverridevirtual |
Returns the string value used for profiling, default returns the string value.
NOTE: be careful on how you re-implement this method in subclasses, since we do not want the profiling to cause side effects, e.g., changing the state of an ML image.
Reimplemented from MLABField.
|
overridevirtual |
Forces a notify to all observers without changing the value of the field.
Reimplemented from MLABField.
|
slot |
Returns bytes used for a memory image.
|
slot |
Returns bytes used for a paged image.
|
signal |
Signal that is emitted when the field's value changes.
|
slot |
Returns the voxel size as an array with 3 double values.
Scripting example:
|
slot |
Returns the x voxel size.
|
slot |
Returns the y voxel size.
|
slot |
Returns the z voxel size.
|
slot |
Returns the voxel-to-world matrix (as [][] array).
|
slot |
Returns the voxel-to-world matrix as Inventor array.
|
slot |
Returns the volume of a single voxel in cubic millimeters (mm^3).
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 (as [][] array).
|
slot |
Returns the world-to-voxel matrix as Inventor array.