MeVisLab Toolbox Reference
ml::FileListTools::FileAttribute Class Reference

#include <mlFileListToolsFileAttribute.h>

Public Types

enum  FileTypeFlags {
  IsValidFile = 1 , IsOther = 2 , IsDCMTiffPair = 4 , IsValidDCMFrame = 8 ,
  IsUnknownOrInvalidFileType = 16 , IsMLImage = 32 , AllFileTypeBits = 63
}
 Flag bits describing file types. More...

Public Member Functions

 FileAttribute (const DICOMCachedIOFileHandle &absoluteFilePath=DICOMCachedIOFileHandle(), bool passObject=true, std::string volLabel="", std::string importCfg="", std::string procSettings="", MLuint32 fileTypeMaskArg=0)
DCMTree::Const_TreePtr getDcmTree (DicomMessageCollector &dcmMsgCollector, bool alsoGetFromMLImage=false, bool alsoGetFromDCMTIFF=false, bool tryDCMLoad=false) const

Public Attributes

DICOMCachedIOFileHandle filePath
bool pass
std::string volumeLabel
std::string importConfig
std::string processingSettings
MLuint32 fileTypeMask
 Bit combination of FileTypeFlags describing the type of file.
std::string otherFile
bool isDCMFilePairPart
 True if this file is the DICOM file of a DCM/Tiff file pair.
bool isTiffFilePairPart
 True if this file is the Tiff file of a DCM/Tiff file pair.
bool isDecomposed

Detailed Description

Attributes assigned to files in a FileList according to filter operations on the file names or DICOM tags found in the files.

Definition at line 40 of file mlFileListToolsFileAttribute.h.

Member Enumeration Documentation

◆ FileTypeFlags

Flag bits describing file types.

Enumerator
IsValidFile 

The given path describes a file whose format was detected by extension- or file header analysis.

IsOther 

File belongs to a DCM/TIFF pair or it is any other file, but it is no normal DICOM file.

IsDCMTiffPair 

File belongs to a DCM/Tiff file pair (either a TIFF or a reduced DICOM file).

IsValidDCMFrame 

File is a valid DICOM frame (but it is not part of a DCM/Tif pair).

IsUnknownOrInvalidFileType 

The given path does not describe a known file type.

IsMLImage 

The file is an .mlimage file.

AllFileTypeBits 

All possibly set bits ORed together. Does not describe a valid mode.

Definition at line 74 of file mlFileListToolsFileAttribute.h.

Constructor & Destructor Documentation

◆ FileAttribute()

ml::FileListTools::FileAttribute::FileAttribute ( const DICOMCachedIOFileHandle & absoluteFilePath = DICOMCachedIOFileHandle(),
bool passObject = true,
std::string volLabel = "",
std::string importCfg = "",
std::string procSettings = "",
MLuint32 fileTypeMaskArg = 0 )
inline

Constructor to initialize all members with default or with user defined values.

Parameters
absoluteFilePathThe path to the file which is described by these attributes.
passObjectThe flag describing whether the object is going to be passed to the import process or not.
volLabelA label which can be assigned to a files to determine groups of files to be imported together.
importCfgA DPL configuration string which can be used by importers loading the files in the list.
procSettingsA generic line-wise interpreted settings string which can be parsed by file importers for dedicated settings.
fileTypeMaskArgSet ofFileTypeFlags describing the file, its type etc.

Definition at line 54 of file mlFileListToolsFileAttribute.h.

References filePath, fileTypeMask, importConfig, isDCMFilePairPart, isDecomposed, isTiffFilePairPart, otherFile, pass, processingSettings, and volumeLabel.

Member Function Documentation

◆ getDcmTree()

DCMTree::Const_TreePtr ml::FileListTools::FileAttribute::getDcmTree ( DicomMessageCollector & dcmMsgCollector,
bool alsoGetFromMLImage = false,
bool alsoGetFromDCMTIFF = false,
bool tryDCMLoad = false ) const

Gets the (cached) tree related to the file name (or loads it if necessary).

Parameters
dcmMsgCollectorCollects error, info and issue messages (typically related to a handle).
alsoGetFromMLImageAlso try to load from .mlimage files, default is off for performance reasons; if true this is tried independent of any already set or not set members about file types or file type masks, and does not set/reset them either.
alsoGetFromDCMTIFFAlso try to load from DCM/Tiff file pairs, default is off for performance reasons; if true this is tried independent of any already set or not set members about file types or file type masks, and does not set/reset them either.
tryDCMLoadTry to load the file as normal DICOM even if it may not have good performance or fileTypeMask indicates that it's no DICOM; normally this is off, but if any suspected non DICOM file is recognized as DICOM anyway, then this check make sense.
Returns
The determined Const_TreePtr.

Member Data Documentation

◆ filePath

DICOMCachedIOFileHandle ml::FileListTools::FileAttribute::filePath

Absolute file name of the file and/or DCMTree, usually only set by creator. PLUGINS SHOULD NOT MODIFY THIS MEMBER!

Definition at line 86 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ fileTypeMask

MLuint32 ml::FileListTools::FileAttribute::fileTypeMask

Bit combination of FileTypeFlags describing the type of file.

Definition at line 126 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ importConfig

std::string ml::FileListTools::FileAttribute::importConfig

If non empty then volumes with identical volumeLabel importConfig, and processingSettings will be handled in their own import step with the given importConfig instead of the DPL config in the FileListTools.

Definition at line 113 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ isDCMFilePairPart

bool ml::FileListTools::FileAttribute::isDCMFilePairPart

True if this file is the DICOM file of a DCM/Tiff file pair.

Definition at line 131 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ isDecomposed

bool ml::FileListTools::FileAttribute::isDecomposed

True if this file is only a decomposed part or frame of a larger file or tree, typically a single DICOM frame from an enhanced multi-frame.

Definition at line 134 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ isTiffFilePairPart

bool ml::FileListTools::FileAttribute::isTiffFilePairPart

True if this file is the Tiff file of a DCM/Tiff file pair.

Definition at line 132 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ otherFile

std::string ml::FileListTools::FileAttribute::otherFile

If a file pair calculation was done then this stores the other part of the file pair, otherwise this string is empty.

Definition at line 128 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ pass

bool ml::FileListTools::FileAttribute::pass

If set to true (the default) then the object will be used and passed to the importer, otherwise it will be ignored.

Definition at line 106 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ processingSettings

std::string ml::FileListTools::FileAttribute::processingSettings

If non empty then volumes with identical volumeLabel, importConfig, and processingSettings will be handled in their own import step with the given processingSettings instead of the DPL config in the FileListTools. The contents of processingSettings is not specified; the settings may be parsed line-wise by the importers for settings they understand.

Definition at line 118 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().

◆ volumeLabel

std::string ml::FileListTools::FileAttribute::volumeLabel

Normally "" but can be set to a label stored in the created MultiFileVolume. Files with different labels will be located in different FileListToolsFileLists.

Definition at line 109 of file mlFileListToolsFileAttribute.h.

Referenced by FileAttribute().


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