15 #ifndef __mlRTObjectSave_H
16 #define __mlRTObjectSave_H
25 #include <ThirdPartyWarningsDisable.h>
27 #include <ThirdPartyWarningsRestore.h>
48 _dicomTree = dicomTree;
52 _dicomTree = dicomTree->copy();
56 void setFilename(
const std::string& filename) { _filename = filename; }
60 virtual void run()
override;
63 std::string _filename;
64 bool _savingWasSuccessful;
81 bool _isInputRTObjectValid();
83 bool _getInputDicomTreeFromBaseField();
Project global and OS specific declarations.
#define MLDCMTKMLCONVERTERMODULES_EXPORT
Base class for ML modules that use background tasks.
Base class for a task that is started in an extra thread.
bool isSynchronous() const
check if task is synchronous (which means it is NOT run in an extra thread)
Field to encapsulate a pointer to an ML base object.
Field to encapsulate a boolean value.
Base class for all fields used in the ML.
Field to encapsulate a float value.
ModuleBackgroundTask extends the ImagingBackgroundTask with a number of useful methods that allow asy...
Base class for an image processing module of the ML.
DcmtkBase derived base object class for base objects that wrap RT related objects.
RTObjectSaveBackgroundTask(Module *module, FloatField *progressField, StringField *statusField)
void setDicomTree(DCMTree::TreePtr dicomTree)
bool hasSuccessfullySaved() const
virtual void run() override
run method that needs to be reimplemented (called from worker thread)
virtual ~RTObjectSaveBackgroundTask()
void setFilename(const std::string &filename)
Module that stores a RTObject to dcm file.
virtual void handleNotification(Field *field) override
Handle field changes of the field field.
Field to encapsulate a string value.
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree