MeVisLab Scripting Reference
|
#include <mlPythonModule.h>
Inherits QObject.
Public Types | |
enum | HandleInput { Invalidate = ml::PythonModule::Invalidate , AllowDisconnectedInput = ml::PythonModule::AllowDisconnectedInput , AllowInvalidImage = ml::PythonModule::AllowInvalidImage , AllowAny = ml::PythonModule::AllowAny } |
enum | InputSubImageBoxMode { UsePython = ml::PythonModule::UsePython , EmptyBox = ml::PythonModule::EmptyBox , OutputSubImageBox = ml::PythonModule::OutputSubImageBox , InputImageBox = ml::PythonModule::InputImageBox , OutputImageBox = ml::PythonModule::OutputImageBox } |
Public Slots | |
Access to PythonModule. | |
| |
void | setPythonModule (const char *name) |
void | setTouchOutputsOnInputChange (bool flag=true) |
void | setHandleInput (int index, HandleInput handleInputFlag) |
void | setInputSubImageBoxMode (InputSubImageBoxMode mode, int inIndex=-1, int outIndex=-1) |
void | setInputSubImageBoxOffsets (const QList< quint64 > &offset1, const QList< quint64 > &offset2, int inIndex=-1, int outIndex=-1) |
void | setClipInputSubImageBoxToInputImage (bool clip=true, int inIndex=-1, int outIndex=-1) |
QList< int > | getInnerDimensionsForDataType (int mlDataType) |
A ML module that supports image processing implemented in Python.
This interface allows to set the input image handling for invalid inputs.
How to handle the inputs if they are either disconnected or contain an invalid image.
How to calculate the input sub image boxes.
|
slot |
Returns an array with the inner dimensions of the ML datatype (for vec and matrix, otherwise the returned list is empty).
|
slot |
Sets if the input sub image box should be clipped to the input image (only used if InputSubImageBoxMode is not InputSubImageBoxMode::UsePython) If -1 is used for input image index or output image index, the mode is used for all inputs/outputs.
|
slot |
Set how the input image at index should be handled if the input is disconnected or if it is connected but has an invalid image.
If you allow both invalid and disconnected inputs, you can use AllowAny. Note that the default is Invalidate for all outputs. These flags need to be set in the init phase of the module.
|
slot |
Allows to specify how the input sub image box should be calculated.
If -1 is used for input image index or output image index, the mode is used for all inputs/outputs. Default is InputSubImageBoxMode::UsePython. It is much more efficient to not use Python but to specify a different mode.
|
slot |
Sets the offsets that should be added to the input sub image box.
(only used if InputSubImageBoxMode is not InputSubImageBoxMode::UsePython nor InputSubImageBoxMode::EmptyBox) If -1 is used for input image index or output image index, the mode is used for all inputs/outputs.
|
inlineslot |
Sets the name of the associated MeVisLab python module, which is found via sys.modules.
|
inlineslot |
Sets that the output images are touched/not touched by the module when any input image changes (the default is true)