MeVisLab Toolbox Reference
ml::DirectDicomImportDPLImporter Class Reference

Class handling all DICOM Processor Library Import (DPL) stuff for the DirectDicomImport module. More...

#include <mlDirectDicomImportDPLImporter.h>

Inheritance diagram for ml::DirectDicomImportDPLImporter:
ml::DirectDicomImportImporterBase ml::ProgressLogger

Public Member Functions

 DirectDicomImportDPLImporter (DirectDicomImport &ddiOp)
 Constructor using a DirectDicomImport instance associated with.
 
 ~DirectDicomImportDPLImporter () override
 Destructor.
 
void appendFields (FieldContainer &fieldContainer) override
 Appends all parameter fields related to DPL import to fieldContainer.
 
void handleNotification (Field &field) override
 Handles all field changes related to fields created in appendDPLArgumentFields().
 
virtual bool scanRecursively () const
 Returns true if settings require a recursive directory scan, otherwise it returns false for a flat scan.
 
virtual bool decomposeMultiFrames () const
 Returns true if (DICOM multi-frame) files shall be decomposed to single frames during imports, otherwise false.
 
virtual bool copyFullFunctionalGroupSequences () const
 Returns true if functional group sequences shall fully be copied during enhanced multi-frame decompositions, otherwise false.
 
void import (const FileListTools::FileList &fileList) override
 Builds MultiFileVolume(s) from files provided by fileList.
 
EnumFieldgetDplSpecialProcessorsFld () const
 Provides access to some fields used outside.
 
DirectDicomImportDPLLoggergetDPLLogger ()
 Returns the used DPL logger instance.
 
- Public Member Functions inherited from ml::DirectDicomImportImporterBase
 DirectDicomImportImporterBase (DirectDicomImport &ddiOp)
 Constructor using a DirectDicomImport instance associated with.
 
 ~DirectDicomImportImporterBase () override
 Destructor.
 
void updateProgressIndicator (const std::string &info, float percState) override
 Update a progress indicator which shows the message info and the percentage percState.
 
void _updateConsole (bool fullUpdate=true) override
 Updates the output console if there is any.
 
virtual DicomConfigurableMessageFilterBaseRefCountedPtr getMessageCollector () const
 Privides access to the message collector of the internally referenced DDI instance.
 
- Public Member Functions inherited from ml::ProgressLogger
 ProgressLogger (std::stringstream *outputStream=nullptr, NotifyField *intCheckField=nullptr, StringField *statusField=nullptr, bool useRichTextCoding=true)
 Default and convenience constructor.
 
virtual ~ProgressLogger ()
 Destructor.
 
void setAutoNewLineTermination (bool on)
 Enable/disable automatic newline termination of logged messages.
 
bool isAutoNewLineTerminationOn () const
 Returns enabled/disabled automatic newline termination of logged messages.
 
virtual bool messageHook (const ProgressLogger &, MLMessageType, const std::string *, const std::string *, MLErrorCode *, const std::string *, unsigned int *)
 All logging methods pass their function arguments through this hook which allows to collect all messages sent to the ProgressLogger.
 
void logAnyMessage (std::string msg, unsigned int formatFlags=NoFlags)
 Log any string into the console.
 
void logFatalError (const std::string &func, MLErrorCode err, const std::string &reason)
 Logs a fatal error, an error, warning or information to the defined output stream/console.
 
void logError (const std::string &func, MLErrorCode err, const std::string &reason)
 See logFatalError() for details.
 
void logWarning (const std::string &func, MLErrorCode err, const std::string &reason)
 See logFatalError() for details.
 
void logInfo (const std::string &func, const std::string &reason="")
 Same as logFatalError, logError, and logWarning, but logging only information without error.
 
void logFullFatalError (const std::string &func, MLErrorCode err, const std::string &reason)
 Logs a fatal error, an error, warning or information to the defined output stream/console and sends the information also to the MeVisLab error handler.
 
void logFullError (const std::string &func, MLErrorCode err, const std::string &reason)
 See logFullFatalError() for details.
 
void logFullWarning (const std::string &func, MLErrorCode err, const std::string &reason)
 See logFullFatalError() for details.
 
void logFullInfo (const std::string &func, const std::string &reason)
 Same as logFullFatalError, logFullError, and logFullWarning, but logging only information without error.
 
bool getRichTextCodingFlag () const
 If enabled (the default) then outputs newlines are always converted to hyper/rich text line separators (
) and different message types get different colors; if false then
contents they are always converted to normal newline characters and rich/hypertext color statements are not inserted.
 
void setRichTextCodingFlag (bool useRichTextCoding)
 See getRichTextCodingFlag() for details.
 
bool getUpdateProgressDuringInterruptChecksFlag () const
 If enabled then progress updates are performed on each interrupt check; this is useful to enable the busy cursor together with interrupt checks.
 
void setUpdateProgressDuringInterruptChecksFlag (bool callUpdateProgressDuringInterruptChecks)
 See getUpdateProgressDuringInterruptChecksFlag() for details.
 
void setStatusUpdateTimeIntervalInSeconds (double checkIntervalInSeconds)
 Sets a time interval which is used to avoid that too many Module::updateProgress() calls are performed to update the user interfaces (which usually are very expensive); default is 1 second.
 
double getStatusUpdateTimeIntervalInSeconds () const
 Returns the currently set Module::updateProgress() call time interval when status fields are updated.
 
void setCheckTimeIntervalInSeconds (double checkIntervalInSeconds)
 Sets a time interval which is used to avoid that too many interruption checks are performed which usually are very expensive, default is 1 second.
 
double getCheckTimeIntervalInSeconds () const
 Returns the currently set interrupt check time interval.
 
void setInterruptCheckFunction (InterruptCheckFunc checkFunc, void *userData)
 Set a function which actually does a check for interrupts and its user data.
 
InterruptCheckFunc getInterruptCheckFunction () const
 Returns the currently set function for interrupt checks.
 
voidgetInterruptCheckFunctionUserData () const
 Returns the currently set user data pointer for interrupt checks.
 
void setInterruptCheckField (NotifyField *interruptField=nullptr)
 Set a NotifyField which shall be checked for button presses which mean interruptions; ignored if nullptr.
 
NotifyFieldgetInterruptCheckField () const
 Return the currently set NotifyField pointer which shall be checked for button presses; default is nullptr.
 
void setStatusField (StringField *statusField)
 Set a StringField which always shall be updated with all logged messages; ignored if nullptr.
 
StringFieldgetStatusField () const
 Return the currently set StringField pointer which is updated on logged messages; default is nullptr.
 
virtual bool wasInterrupted ()
 If the interruption flag is already set then immediately true is returned.
 
virtual bool getInterruptedFlag () const
 Returns current state of interruption flag (but does not check for interruption).
 
virtual void setInterruptedFlag (bool wasInterrupted)
 Sets current state of interruption flag (but does not check for interruption).
 
virtual bool orToInterruptedFlag (bool wasInterrupted)
 Update interruption flag by ORing the passed flag to the internal flag and then returning the flag (but does not check for interruption).
 
void setHadFlags (bool hadFlag)
 Sets all had*Flags to hadFlag.
 
void setFatalErrorMessagePrefix (const std::string &msg)
 Set/get prefixes for messages.
 
void setErrorMessagePrefix (const std::string &msg)
 
void setWarningMessagePrefix (const std::string &msg)
 
void setInfoMessagePrefix (const std::string &msg)
 
std::string getFatalErrorMessagePrefix () const
 
std::string getErrorMessagePrefix () const
 
std::string getWarningMessagePrefix () const
 
std::string getInfoMessagePrefix () const
 
bool hadFatalError () const
 Returns true if any fatal error, error, warning or info was logged; can be reset with corresponding setHad*Flag().
 
bool hadError () const
 
bool hadWarning () const
 
bool hadInfo () const
 
void setHadFatalErrorFlag (bool hadFatalErrorFlag)
 Sets the state of the corresponding _had* member; used to clear recent logging states.
 
void setHadErrorFlag (bool hadErrorFlag)
 
void setHadWarningFlag (bool hadWarningFlag)
 
void setHadInfoFlag (bool hadInfoFlag)
 

Protected Member Functions

DPL parameter determination, either from fields or from connected file filer override values.
const std::string & _getImportFilterProcessingSettings () const
 Returns the externally provided processing settings for the currently processed volume.
 
void _setImportFilterProcessingSettings (const std::string &procSettings)
 Returns the externally provided processing settings for the currently processed volume.
 
bool _doArgumentAndOverrideCheck (bool dplFlag, const std::string &overrideName) const
 If overrideName is defined as 0 or non 0 in getImportFilterProcessingSettings(), then false or true is returned, respectively.
 
std::vector< DirectDicomImportDPLTagValueProvider::HardOverwriteTag_getHardOverwriteTags ()
 Returns a vector of hardOverwrite tags either from input filter settings or from the DPL importer fields.
 
std::string _getForce2DPlusTCondition ()
 Determines the force2DPlusTCondition either from input filters or from DPL fields; it is used by the DPL importer as force2DPlusTCondition.
 
DicomToMLTools::CalculateMinMaxFromDicomModes _getUsedMinMaxScanMode ()
 Returns the used mode for the min/max calculations from input filters and field settings.
 
- Protected Member Functions inherited from ml::DirectDicomImportImporterBase
virtual MultiFileVolumeList_getOutVolumeList ()
 Modifiable list of DirectDicomImportVolumeReferences to which new volumes are going to be appended during the import process.
 
- Protected Member Functions inherited from ml::ProgressLogger
std::string _doAutoNewLineTerminate (const std::string &msg) const
 Helper to terminate msg with newline at end according.
 
virtual bool _isStopPressed () const
 Checks for interruption with currently set _checkFunc or _interruptCheckField or returns false if not available.
 

Additional Inherited Members

- Public Types inherited from ml::ProgressLogger
enum  FormatFlags {
  NoFlags = 0 , Bold = 1 , Green = 2 , Yellow = 4 ,
  Red = 8 , Blue = 16
}
 Enumerator describing some formatting flags. More...
 
typedef bool(* InterruptCheckFunc) (void *userData)
 Function type to check to for an interruption.
 
- Static Public Member Functions inherited from ml::ProgressLogger
static bool isPressedField (NotifyField *fieldToCheck)
 Convenience implementation of an interrupt check function if user of this class does not want to implement his own check callback but only wants to check a NotifyField for presses.
 
- Static Protected Member Functions inherited from ml::ProgressLogger
static void _updateProgressIndicatorCB (void *userData, const std::string &info, float state)
 Static callback version to update a progress indicator about the current import state.
 

Detailed Description

Class handling all DICOM Processor Library Import (DPL) stuff for the DirectDicomImport module.

Definition at line 48 of file mlDirectDicomImportDPLImporter.h.

Constructor & Destructor Documentation

◆ DirectDicomImportDPLImporter()

ml::DirectDicomImportDPLImporter::DirectDicomImportDPLImporter ( DirectDicomImport & ddiOp)

Constructor using a DirectDicomImport instance associated with.

◆ ~DirectDicomImportDPLImporter()

ml::DirectDicomImportDPLImporter::~DirectDicomImportDPLImporter ( )
override

Destructor.

Member Function Documentation

◆ _doArgumentAndOverrideCheck()

bool ml::DirectDicomImportDPLImporter::_doArgumentAndOverrideCheck ( bool dplFlag,
const std::string & overrideName ) const
protected

If overrideName is defined as 0 or non 0 in getImportFilterProcessingSettings(), then false or true is returned, respectively.

If it is not set then then dplFlag is returned.

◆ _getForce2DPlusTCondition()

std::string ml::DirectDicomImportDPLImporter::_getForce2DPlusTCondition ( )
protected

Determines the force2DPlusTCondition either from input filters or from DPL fields; it is used by the DPL importer as force2DPlusTCondition.

◆ _getHardOverwriteTags()

std::vector< DirectDicomImportDPLTagValueProvider::HardOverwriteTag > ml::DirectDicomImportDPLImporter::_getHardOverwriteTags ( )
protected

Returns a vector of hardOverwrite tags either from input filter settings or from the DPL importer fields.

◆ _getImportFilterProcessingSettings()

const std::string & ml::DirectDicomImportDPLImporter::_getImportFilterProcessingSettings ( ) const
protected

Returns the externally provided processing settings for the currently processed volume.

◆ _getUsedMinMaxScanMode()

DicomToMLTools::CalculateMinMaxFromDicomModes ml::DirectDicomImportDPLImporter::_getUsedMinMaxScanMode ( )
protected

Returns the used mode for the min/max calculations from input filters and field settings.

◆ _setImportFilterProcessingSettings()

void ml::DirectDicomImportDPLImporter::_setImportFilterProcessingSettings ( const std::string & procSettings)
protected

Returns the externally provided processing settings for the currently processed volume.

◆ appendFields()

void ml::DirectDicomImportDPLImporter::appendFields ( FieldContainer & fieldContainer)
overridevirtual

Appends all parameter fields related to DPL import to fieldContainer.

Usually called in a constructor where notification handling should be deactivated to avoid side effects to handleNotification.

Reimplemented from ml::DirectDicomImportImporterBase.

◆ copyFullFunctionalGroupSequences()

virtual bool ml::DirectDicomImportDPLImporter::copyFullFunctionalGroupSequences ( ) const
virtual

Returns true if functional group sequences shall fully be copied during enhanced multi-frame decompositions, otherwise false.

◆ decomposeMultiFrames()

virtual bool ml::DirectDicomImportDPLImporter::decomposeMultiFrames ( ) const
virtual

Returns true if (DICOM multi-frame) files shall be decomposed to single frames during imports, otherwise false.

◆ getDPLLogger()

DirectDicomImportDPLLogger & ml::DirectDicomImportDPLImporter::getDPLLogger ( )

Returns the used DPL logger instance.

◆ getDplSpecialProcessorsFld()

EnumField & ml::DirectDicomImportDPLImporter::getDplSpecialProcessorsFld ( ) const

Provides access to some fields used outside.

◆ handleNotification()

void ml::DirectDicomImportDPLImporter::handleNotification ( Field & field)
overridevirtual

Handles all field changes related to fields created in appendDPLArgumentFields().

Reimplemented from ml::DirectDicomImportImporterBase.

◆ import()

void ml::DirectDicomImportDPLImporter::import ( const FileListTools::FileList & fileList)
overridevirtual

Builds MultiFileVolume(s) from files provided by fileList.

Parameters
fileListManager for a map of file names associated with filter attributes.

Implements ml::DirectDicomImportImporterBase.

◆ scanRecursively()

virtual bool ml::DirectDicomImportDPLImporter::scanRecursively ( ) const
virtual

Returns true if settings require a recursive directory scan, otherwise it returns false for a flat scan.


The documentation for this class was generated from the following file: