MeVisLab Toolbox Reference
mlModuleLoaderBackendsInterface.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
16// DICOM tree prototypes
17#include <DCMTree_Lib.h>
18
19// ML includes
20#include <mlModuleIncludes.h>
21#include <mlAPI.h>
22
23ML_START_NAMESPACE
24
25// Forward of internally used classes.
26class MLImageFormat;
27class ProgressLogger;
28
29//----------------------------------------------------------------------------------
31//----------------------------------------------------------------------------------
34public:
41
44
71 virtual MLErrorCode loadWithMLImageFormat(const std::string &pageFileName,
72 SubImage &outSubImg,
73 const ImageVector &corrOffset,
74 MLImageFormat **loader,
75 bool loadFullImage=false) = 0;
76
93 const std::string &outFileName,
94 const std::string &mliCompress,
95 bool updateMinMaxAfterSave) = 0;
96
109 virtual void getDCMTreeFromMLImageFile(const std::string &mlImageFileName,
110 DCMTree::Const_TreePtr &treePtr,
111 size_t &numVols,
112 MLErrorCode &fileLoadError,
113 MLErrorCode &treeExtractError) = 0;
114
144 virtual MLErrorCode loadWithImgFileLoader(const std::string &pageFileName,
145 SubImage &outSubImg,
146 const ImageVector &corrOffset,
147 MLint dcmTiffExtZ,
148 const bool isDCMTiff,
149 bool loadFullImage=false) = 0;
150
162 virtual MLErrorCode saveSubImgInFile(const SubImage &srcSubImg,
163 const std::string &outFileName) = 0;
164
181 const std::string &outFile,
182 MLint ext,
183 bool useMiddleSlice=true,
184 bool buildNoPreviewImageOnInvalidImage=false) = 0;
185
253 virtual MLErrorCode loadWithMLItkImageFileReader(const std::string &pageFileName,
254 SubImage &outSubImg,
255 const ImageVector &corrOffset,
256 MLDataType fileDataType,
257 Module **loader,
258 DCMTree::Const_TreePtr constTreePtr,
259 bool dstIsRGB,
260 std::string *metaDataDump=nullptr,
261 bool loadFullImage=false,
262 size_t itkLoadDim=3,
263 bool hideErrorPosts=false,
264 const SubImageBox &expectedImageExtent=SubImageBox()) = 0;
265
304 virtual MLErrorCode loadWithHistoLoad(const std::string &fileName,
305 SubImage &outSubImg,
306 const ImageVector &corrOffset,
307 Module **loaderToCreate,
308 bool loadFullImage,
309 PagedImage *pagedImg=nullptr,
310 MLint level=0) = 0;
311
316
320 virtual std::string getImagePropertiesWithImgFileReader(const std::string &fileName,
321 PagedImage &pImgProps,
322 std::string &fileFormat) = 0;
323
326 virtual MLErrorCode getImagePropertiesWithMLImageFormatReader(const std::string &fileName,
327 PagedImage &pImgProps) = 0;
328
331};
332
333ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLMODULE_LOADER_BACKENDS_EXPORT
DLL export macro definition.
ML_ABSTRACT_ROOT_CLASS_HEADER(CoreModuleLoaderBackendInterface)
Registration in the ML runtime type system, ML_ABSTRACT_ROOT_CLASS_SOURCE is in ModuleLoadersBackends...
CoreModuleLoaderBackendInterface(const CoreModuleLoaderBackendInterface &)=default
Default copy constructor.
virtual ~CoreModuleLoaderBackendInterface()
Virtual destructor to make derived versions correctly deleted.
CoreModuleLoaderBackendInterface & operator=(const CoreModuleLoaderBackendInterface &)=default
Default assignment operator.
virtual void destroyMLImageFormatFileReaderInstance(MLImageFormat *&instance)=0
virtual void getDCMTreeFromMLImageFile(const std::string &mlImageFileName, DCMTree::Const_TreePtr &treePtr, size_t &numVols, MLErrorCode &fileLoadError, MLErrorCode &treeExtractError)=0
virtual MLErrorCode loadWithImgFileLoader(const std::string &pageFileName, SubImage &outSubImg, const ImageVector &corrOffset, MLint dcmTiffExtZ, const bool isDCMTiff, bool loadFullImage=false)=0
virtual MLErrorCode saveSubImgInFile(const SubImage &srcSubImg, const std::string &outFileName)=0
virtual MLErrorCode createAndSaveThumbNail(PagedImage &srcImg, const std::string &outFile, MLint ext, bool useMiddleSlice=true, bool buildNoPreviewImageOnInvalidImage=false)=0
virtual MLErrorCode loadWithMLItkImageFileReader(const std::string &pageFileName, SubImage &outSubImg, const ImageVector &corrOffset, MLDataType fileDataType, Module **loader, DCMTree::Const_TreePtr constTreePtr, bool dstIsRGB, std::string *metaDataDump=nullptr, bool loadFullImage=false, size_t itkLoadDim=3, bool hideErrorPosts=false, const SubImageBox &expectedImageExtent=SubImageBox())=0
virtual MLErrorCode loadWithMLImageFormat(const std::string &pageFileName, SubImage &outSubImg, const ImageVector &corrOffset, MLImageFormat **loader, bool loadFullImage=false)=0
virtual MLErrorCode saveAsMLImageFormat(PagedImage &imgToSave, const std::string &outFileName, const std::string &mliCompress, bool updateMinMaxAfterSave)=0
virtual std::string getImagePropertiesWithImgFileReader(const std::string &fileName, PagedImage &pImgProps, std::string &fileFormat)=0
virtual MLErrorCode loadWithHistoLoad(const std::string &fileName, SubImage &outSubImg, const ImageVector &corrOffset, Module **loaderToCreate, bool loadFullImage, PagedImage *pagedImg=nullptr, MLint level=0)=0
CoreModuleLoaderBackendInterface()=default
Default constructor.
virtual MLErrorCode getImagePropertiesWithMLImageFormatReader(const std::string &fileName, PagedImage &pImgProps)=0
File format class to store, load, and modify a PagedImage in a file.
MLint32 MLDataType
Definition mlTypeDefs.h:595
MLint32 MLErrorCode
Type of an ML Error code.
Definition mlTypeDefs.h:715
MLint64 MLint
Definition mlTypeDefs.h:489
boost::shared_ptr< const Tree > Const_TreePtr
Definition DCMTree_Lib.h:67
TSubImageBox< MLint > SubImageBox
Defines the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type...
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.