MeVisLab Toolbox Reference
mlDirectDicomImportOtherImporter.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11#pragma once
12
13// Local includes
15#include "mlModuleIncludes.h"
17
19
20// Forward to internally used classes.
21class DicomMessageCollector;
22class DirectDicomImport;
23class MultiFileVolume;
24class _FilePropHelper;
25class FileReaderPluginsBase;
26//----------------------------------------------------------------------------------
28//----------------------------------------------------------------------------------
30
31public:
32
35
38
41
44
48 void import(const FileListTools::FileList &fileList) override;
49
50protected:
51
59 std::vector<_FilePropHelper> &filePropVec,
60 float progressStart,
61 float progressEnd);
62
64 virtual void _propertySort(std::vector<_FilePropHelper> &filePropVec);
65
74 virtual size_t _composeAndAppendVolumes(const std::vector<_FilePropHelper> &filePropVec,
76 DicomMessageCollector &dcmMsgCollector);
77
83
94 const std::string &metaData,
95 const std::string &fileName);
96
105 DicomMessageCollector &dcmMsgCollector);
106
107private:
108
116 void _appendMLImageFileProperties(const std::string &fileName,
117 bool checkSilently,
118 std::vector<_FilePropHelper> &filePropVec);
119
128 bool _appendLoaderPluginFileProperties(const std::string &fileName,
129 bool checkSilently,
130 std::vector<_FilePropHelper> &filePropVec);
131
142 std::string _appendImgFileReaderProperties(const std::string &fileName,
143 bool checkSilently,
144 bool isDCMTiffPair,
145 std::vector<_FilePropHelper> &filePropVec);
146
154 void _appendItkImageFileReaderProperties(const std::string &fileName,
155 bool checkSilently,
156 std::vector<_FilePropHelper> &filePropVec);
157
159 enum ComposeOtherFilesModes {
160 COMPOSE_OTHER_FILES_SINGLE = 0,
161 COMPOSE_OTHER_FILES_HEAP,
162
163 NUM_COMPOSE_OTHER_FILES_MODES
164 };
165
167 static const char * const composeOtherFilesModesStrings[NUM_COMPOSE_OTHER_FILES_MODES];
168
172 EnumField *_composeOtherFilesModeFld;
173
178 StringField *_silentTrialFileTypesFld;
179
181 std::vector< std::string > _silentTrialFileTypes;
182
186 Module *_mlItkImageFileReader;
187
193
205 void _optimizeImageReaderPageExtents(_FilePropHelper& fileProp);
206};
207
Project global and OS specific declarations.
#define MLDIRECTDICOMIMPORT_EXPORT
Only for diagnostic purposes.
Class to collect messages and errors related to a given frame handle.
Base importer class for the DirectDicomImport module.
Derived importer to import non DICOM files into DirectDicomImport.
DirectDicomImportOtherImporter(DirectDicomImport &ddiOp)
Constructor using a DirectDicomImport instance associated with.
virtual void _appendNewDirectVolumeReferenceFromFilePropHelper(const _FilePropHelper &fileProp, const FileListTools::FileList &fileList, DicomMessageCollector &dcmMsgCollector)
Creates and append a new DirectDicomVolumeReference with settings from a _FilePropHelper.
virtual void _determineProperties(const FileListTools::FileList &fileList, std::vector< _FilePropHelper > &filePropVec, float progressStart, float progressEnd)
Determine a vector of image properties and file names of loadable files.
virtual void _appendMetaData(ImagePropertyExtensionContainer &imgPropContainer, const std::string &metaData, const std::string &fileName)
Append tag dump (and file name for entry when it's created) to an ImagePropertyExtension entry.
void appendFields(FieldContainer &fieldContainer) override
Creates and appends all parameter fields for this importer. To be called in constructor.
virtual size_t _composeAndAppendVolumes(const std::vector< _FilePropHelper > &filePropVec, const FileListTools::FileList &fileList, DicomMessageCollector &dcmMsgCollector)
Compose same sized images with same voxel type of entries in filePropVec to volumes and append those ...
virtual void _postProcessVolumes(size_t lastNumVolumesToProcess)
Some settings can be set up best after full composition of the volumes, for example storing the image...
void handleNotification(Field &field) override
Handles changes of fields added by appendFields.
virtual void _propertySort(std::vector< _FilePropHelper > &filePropVec)
Sort filePropVec according image extent and file name given by the vector entries.
~DirectDicomImportOtherImporter() override
Destructor.
Imports image files directly from DICOM or other file types without an intermediate representation.
Field to encapsulate an enumerated value.
Definition mlFields.h:195
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field).
Base class for all fields used in the ML.
Definition mlField.h:73
A tool class to manage a list of file/frame names/urls associated with attributes.
This class is a container for extended image properties derived from ImagePropertyExtension.
Base class for an image processing module of the ML.
Definition mlModule.h:151
Field to encapsulate a string value.
Definition mlFields.h:610
Base importer class for the DirectDicomImport module.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.