108 const std::string &
sep=
", ",
120 void _selectImageDataStruct(
size_t index);
123 void _initializeSubImage(
size_t index);
141 std::vector<DMImageDataStructPtr> _imgList;
150 size_t _currentImageDataStructIndex;
Project global and OS specific declarations.
#define MLDMFileReader_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Base class to implement raw data loaders which need byte swapping and basic file access on byte or ra...
A tool classes to load Digital Microscopy files.
DMFileReader(const std::string &fileName)
Constructor already setting the file name.
size_t getNumberOfImageStructures()
Returns the number of image structures inside of the loaded tags.
virtual std::string getAsString(const std::string &prefix="", const std::string &sep=", ", const size_t maxNumBinaryEntries=8, const size_t maxNumStringEntries=20) const override
Convert content to a human readable string with the prefix prefix before all lines and separator sep ...
DMTagPtrVector & getTags()
Returns the map with all group and data tags.
const PagedImage & getPagedImage(size_t index)
Initializes and returns the currently used PagedImage settings where index specifies which one of pos...
~DMFileReader() override
Destructor (automatically closes the current open file if there is any and clear allocated subimage d...
void open() override
Opens the file if possible, isGood() will return true on success, otherwise false; if byte swapping m...
DMFileReader()
Default constructor which gets its settings later.
DMTagPtrVector & getGroupTags()
Returns the map with all group tags.
DMImagePtr getImage() const
Returns the current image member as constant reference.
MLuint64 getFileSize() const
Returns the size of the file from header.
bool isDM4() const
Returns true if currently a .dm4 file is loaded.
DMTagPtrVector & getDataTags()
Returns the map with all data tags.
DMTagDirectory & getGroupTagMap()
Returns the global map with all group tags.
SubImage & getSubImage(size_t index)
Returns the entire image data as SubImage.
MLuint64 getImageFormatVersion() const
Returns the version of the currently loaded image.
DMTagDirectory & getTagMap()
Returns the global map with all data and group tags.
bool isDM3() const
Returns true if currently a .dm3 file is loaded.
MLuint64 getVersion() const
Returns the version of the file.
MLuint64 getDMIndexUWord(MLuint64 pos) const
Read an unsigned 32 bit word from .dm3 files and a 64 bit one from .dm4 files from position pos.
void close() override
Closes the file if it was open, otherwise the call is ignored.
DMTagDirectory & getDataTagMap()
Returns the global map with all data tags.
Representation for the DM file as data structure.
Representation for the DM file as data structure.
Representation for the DM file as data structure.
Class which represents an image, which manages properties of an image and image data which is located...
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
Basic binary data loader class.
Project wide definitions.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
UINT64 MLuint64
Introduce platform independent 64 bit unsigned integer type.
std::ostream & operator<<(std::ostream &out, const ml::Variant &variant)
boost::shared_ptr< DMImage > DMImagePtr
Boost shared-pointer type definitions for DMImage.
std::vector< DMTagPtr > DMTagPtrVector
Vector of shared pointers to DMTags.
boost::shared_ptr< DMTagDirectory > DMTagDirectoryPtr
Boost shared-pointer type definitions for DMTagMap.
boost::shared_ptr< DMImageDataStruct > DMImageDataStructPtr
Boost shared-pointer type definitions for DMIMageDataStruct.