|
MeVisLab Toolbox Reference
|
A collection of some tool functions loading files with modules or other backends. More...
Enumerations | |
| enum | { InterleavedPlanarConfig = 1 } |
| Constants used by backend modules, tested for equality in unit test. More... | |
Functions | |
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode | loadWithMLImageFormat (const std::string &pageFileName, SubImage &outSubImg, const ImageVector &corrOffset, MLImageFormat **loader, bool loadFullImage=false) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode | saveAsMLImageFormat (PagedImage &imgToSave, const std::string &outFileName, const std::string &mliCompress, bool updateMinMaxAfterSave) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT void | getDCMTreeFromMLImageFile (const std::string &mlImageFileName, DCMTree::Const_TreePtr &treePtr, size_t &numVols, MLErrorCode &fileLoadError, MLErrorCode &treeExtractError) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode | loadWithImgFileLoader (const std::string &pageFileName, SubImage &outSubImg, const ImageVector &corrOffset, MLint dcmTiffExtZ, const bool isDCMTiff, bool loadFullImage=false) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode | saveSubImgInFile (const SubImage &srcSubImg, const std::string &outFileName) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode | createAndSaveThumbNail (PagedImage &srcImg, const std::string &outFile, MLint ext, bool useMiddleSlice=true, bool buildNoPreviewImageOnInvalidImage=false) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT 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()) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode | loadWithHistoLoad (const std::string &fileName, SubImage &outSubImg, const ImageVector &corrOffset, Module **loaderToCreate, bool loadFullImage, PagedImage *pagedImg=nullptr, MLint level=0) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT void | destroyMLImageFormatFileReaderInstance (MLImageFormat *&instance) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT std::string | getImagePropertiesWithImgFileReader (const std::string &fileName, PagedImage &pImgProps, std::string &fileFormat) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode | getImagePropertiesWithMLImageFormatReader (const std::string &fileName, PagedImage &pImgProps) |
| See corresponding function in ModuleLoaderBackends::CoreInterface. | |
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode | checkOrCreateReusableModule (const std::string &dllName, const std::string &moduleName, const std::vector< std::string > &expectedFields, Module **module, Module **moduleToUse) |
| If module is non nullptr then it is checked for the name moduleName and whether it contains all fields whose names are given in expectedFields. | |
| MLMODULE_LOADER_BACKENDS_EXPORT std::string | getPreferredLoader (const std::string &fileName) |
| If it is possible to derive a preferred loader from the given fileName then the name of the loader is returned as string, otherwise an empty string is returned. | |
A collection of some tool functions loading files with modules or other backends.
| anonymous enum |
Constants used by backend modules, tested for equality in unit test.
| Enumerator | |
|---|---|
| InterleavedPlanarConfig | The MFL planar config enumerator kMFLfmtPcnfContig for "continuous" or interleaved such as RGBRGBRGB. |
Definition at line 73 of file mlModuleLoaderBackends.h.
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::checkOrCreateReusableModule | ( | const std::string & | dllName, |
| const std::string & | moduleName, | ||
| const std::vector< std::string > & | expectedFields, | ||
| Module ** | module, | ||
| Module ** | moduleToUse | ||
| ) |
If module is non nullptr then it is checked for the name moduleName and whether it contains all fields whose names are given in expectedFields.
If *module is nullptr then the dll given with dllName is loaded and module with moduleName is created; then it is checked checks whether the module contains fields with names specified in expectedFields. In any case a valid *module or a successfully created and checked module are returned in **moduleToUse for further use. This function is independent of any backends or whether they are (dis)allowed or (un)loaded.
| dllName | Needed if module is nullptr and a module shall be created, otherwise ignored; in creation case its specifies the name of the dll to be loaded which implements containing with the module to create. |
| moduleName | Needed if module is nullptr and a module shall be created, otherwise ignored; in creation case its specifies the name of the module to create. |
| expectedFields | Fields expected in passed or created module, otherwise ML_BAD_FIELD_TYPE is returned. |
| module | If passed nullptr then a module is created from dll dllName and with module name moduleName; otherwise *module must be non nullptr and module must have name moduleName; if not then an error is returned. |
| moduleToUse | moduleToUse must be passed non-nullptr, **moduleToUse must be nullptr. A passed and/or created module instance will be created if checked for correct name and expected fields. Then module must be removed by the caller after use with MLDeleteModule from mlAPI.h to avoid memory and open file leaks. ML_RESULT_OK if a module has been passed via *module or created and if all expectedFields are found in it, ML_LIBRARY_LOAD_ERROR if no backend implementation is available, and otherwise another error code. |
References checkOrCreateReusableModule().
Referenced by checkOrCreateReusableModule().
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::createAndSaveThumbNail | ( | PagedImage & | srcImg, |
| const std::string & | outFile, | ||
| MLint | ext, | ||
| bool | useMiddleSlice = true, |
||
| bool | buildNoPreviewImageOnInvalidImage = false |
||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References createAndSaveThumbNail().
Referenced by createAndSaveThumbNail().
| MLMODULE_LOADER_BACKENDS_EXPORT void ml::ModuleLoaderBackends::destroyMLImageFormatFileReaderInstance | ( | MLImageFormat *& | instance | ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References destroyMLImageFormatFileReaderInstance().
Referenced by destroyMLImageFormatFileReaderInstance().
| MLMODULE_LOADER_BACKENDS_EXPORT void ml::ModuleLoaderBackends::getDCMTreeFromMLImageFile | ( | const std::string & | mlImageFileName, |
| DCMTree::Const_TreePtr & | treePtr, | ||
| size_t & | numVols, | ||
| MLErrorCode & | fileLoadError, | ||
| MLErrorCode & | treeExtractError | ||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References getDCMTreeFromMLImageFile().
Referenced by getDCMTreeFromMLImageFile().
| MLMODULE_LOADER_BACKENDS_EXPORT std::string ml::ModuleLoaderBackends::getImagePropertiesWithImgFileReader | ( | const std::string & | fileName, |
| PagedImage & | pImgProps, | ||
| std::string & | fileFormat | ||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References getImagePropertiesWithImgFileReader().
Referenced by getImagePropertiesWithImgFileReader().
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::getImagePropertiesWithMLImageFormatReader | ( | const std::string & | fileName, |
| PagedImage & | pImgProps | ||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References getImagePropertiesWithMLImageFormatReader().
Referenced by getImagePropertiesWithMLImageFormatReader().
| MLMODULE_LOADER_BACKENDS_EXPORT std::string ml::ModuleLoaderBackends::getPreferredLoader | ( | const std::string & | fileName | ) |
If it is possible to derive a preferred loader from the given fileName then the name of the loader is returned as string, otherwise an empty string is returned.
Currently only "ImgFileReader" is returned in some cases. This function is independent of any backends or whether they are (dis)allowed or (un)loaded.
References getPreferredLoader().
Referenced by getPreferredLoader().
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::loadWithHistoLoad | ( | const std::string & | fileName, |
| SubImage & | outSubImg, | ||
| const ImageVector & | corrOffset, | ||
| Module ** | loaderToCreate, | ||
| bool | loadFullImage, | ||
| PagedImage * | pagedImg = nullptr, |
||
| MLint | level = 0 |
||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References loadWithHistoLoad().
Referenced by loadWithHistoLoad().
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::loadWithImgFileLoader | ( | const std::string & | pageFileName, |
| SubImage & | outSubImg, | ||
| const ImageVector & | corrOffset, | ||
| MLint | dcmTiffExtZ, | ||
| const bool | isDCMTiff, | ||
| bool | loadFullImage = false |
||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References loadWithImgFileLoader().
Referenced by loadWithImgFileLoader().
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::loadWithMLImageFormat | ( | const std::string & | pageFileName, |
| SubImage & | outSubImg, | ||
| const ImageVector & | corrOffset, | ||
| MLImageFormat ** | loader, | ||
| bool | loadFullImage = false |
||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References loadWithMLImageFormat().
Referenced by loadWithMLImageFormat().
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::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() |
||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References loadWithMLItkImageFileReader().
Referenced by loadWithMLItkImageFileReader().
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::saveAsMLImageFormat | ( | PagedImage & | imgToSave, |
| const std::string & | outFileName, | ||
| const std::string & | mliCompress, | ||
| bool | updateMinMaxAfterSave | ||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References saveAsMLImageFormat().
Referenced by saveAsMLImageFormat().
| MLMODULE_LOADER_BACKENDS_EXPORT MLErrorCode ml::ModuleLoaderBackends::saveSubImgInFile | ( | const SubImage & | srcSubImg, |
| const std::string & | outFileName | ||
| ) |
See corresponding function in ModuleLoaderBackends::CoreInterface.
References saveSubImgInFile().
Referenced by saveSubImgInFile().