Project global and OS specific declarations.
#define MLMODULE_LOADER_BACKENDS_EXPORT
DLL export macro definition.
A collection of some tool functions loading files with modules or other backends.
ML_ABSTRACT_ROOT_CLASS_HEADER(CoreModuleLoaderBackendInterface)
Registration in the ML runtime type system, ML_ABSTRACT_ROOT_CLASS_SOURCE is in ModuleLoadersBackends...
virtual ~CoreModuleLoaderBackendInterface()
Virtual destructor to make derived versions correctly deleted.
virtual void destroyMLImageFormatFileReaderInstance(MLImageFormat *&instance)=0
No-operation call if instance is nullptr, otherwise the MLImageFormat instance will be deleted and re...
virtual void getDCMTreeFromMLImageFile(const std::string &mlImageFileName, DCMTree::Const_TreePtr &treePtr, size_t &numVols, MLErrorCode &fileLoadError, MLErrorCode &treeExtractError)=0
Loads a Const_TreePtr from a valid .mlimage file given by the absolute file path fileName if possible...
virtual MLErrorCode loadWithImgFileLoader(const std::string &pageFileName, SubImage &outSubImg, const ImageVector &corrOffset, MLint dcmTiffExtZ, const bool isDCMTiff, bool loadFullImage=false)=0
Reads overlapping regions of the file pageFileName into outSubImg with the MFL interface.
virtual std::string getPreferredLoader(const std::string &fileName)=0
If it is possible to derive a preferred loader from the given fileName then the name of the loader is...
virtual MLErrorCode saveSubImgInFile(const SubImage &srcSubImg, const std::string &outFileName)=0
Write first 2D slice from srcSubImg in the file with name outFileName.
virtual MLErrorCode createAndSaveThumbNail(PagedImage &srcImg, const std::string &outFile, MLint ext, bool useMiddleSlice=true, bool buildNoPreviewImageOnInvalidImage=false)=0
Create a thumbnail with extent of extX * extY pixels from the ML image given with srcImg and writes i...
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
Reads overlapping regions of the file pageFileName into outSubImg with the ML itkImageFileReader.
virtual MLErrorCode loadWithMLImageFormat(const std::string &pageFileName, SubImage &outSubImg, const ImageVector &corrOffset, MLImageFormat **loader, bool loadFullImage=false)=0
Reads overlapping regions of the file pageFileName into outSubImg with the MLImageFileFormat.
virtual MLErrorCode saveAsMLImageFormat(PagedImage &imgToSave, const std::string &outFileName, const std::string &mliCompress, bool updateMinMaxAfterSave)=0
Save the ML PagedImage given by the output of the ddiOutput as .mlimage file with the compression giv...
virtual std::string getImagePropertiesWithImgFileReader(const std::string &fileName, PagedImage &pImgProps, std::string &fileFormat)=0
If possible then retrieve pImgProps from file fileName by using ImgFileReader::open_ImageFile and Img...
virtual MLErrorCode checkOrCreateReusableModule(const std::string &dllName, const std::string &moduleName, const std::vector< std::string > &expectedFields, Module **module, Module **moduleToUse)=0
If module is non nullptr then it is checked for the name moduleName and whether it contains all field...
virtual MLErrorCode loadWithHistoLoad(const std::string &fileName, SubImage &outSubImg, const ImageVector &corrOffset, Module **loaderToCreate, bool loadFullImage, PagedImage *pagedImg=nullptr, MLint level=0)=0
Reads overlapping regions of the file pageFileName into outSubImg with the ML itkImageFileReader.
virtual MLErrorCode getImagePropertiesWithMLImageFormatReader(const std::string &fileName, PagedImage &pImgProps)=0
If possible then retrieve pImgProps from file fileName by using an MLImageFormat and ML_RESULT_OK is ...
Base class for an image processing module of the ML.
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
This class manages/represents a rectangular 6D image region that is organized linearly in memory.
MLint32 MLDataType
MLDataType.
MLint32 MLErrorCode
Type of an ML Error code.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
boost::shared_ptr< const Tree > Const_TreePtr