127 const std::string &groupPrefix)
const;
141 const std::string &groupPrefix=
"",
142 bool getAsChars=
false)
const;
147 const std::string &groupPrefix=
"",
148 bool getAsChars=
false)
const;
158 const std::string &groupPrefix=
"",
159 bool getAsChars=
false)
const;
185 const std::string &sep=
", ",
186 const std::string &groupPrefix=
"",
187 const size_t maxNumBinaryEntries=8,
188 const size_t maxNumStringEntries=20)
const;
209 mutable MLuint64 _numInfoArrayEntries;
215 mutable bool _dataTypeValid;
Project global and OS specific declarations.
#define MLDMFileReader_EXPORT
If included by external modules, exported symbols are declared as import symbols.
A tool classes to load Digital Microscopy files.
Representation for the DM file as data structure.
bool isArrayOfSimpleType() const
Returns true if the encoded type is an array of simple types, otherwise false.
MLuint64 getNumberOfFieldsInStructure() const
If isStructure() is true it returns the number of structure entries, otherwise it returns 0.
DMTagData(DMFileReader &reader, MLuint64 originPosition)
Constructor initialized with its reader and the data structure position in the file.
MLuint64 getStructureFieldDataTypeSizeOf() const
Returns the file format dependent size in bytes of a structure info entry describing a data type of a...
std::string getDataTypeAsString(DMEncodedStructureType encType) const
Returns a human readable string version for the provided encType.
std::string getStructureFieldValueAsString(MLuint64 structFieldIndex, const std::string &groupPrefix="", bool getAsChars=false) const
If isStructure() is true it returns the n'th value entry of structure types as string,...
std::string getFourPercents() const
Reads and returns the four starting percent characters.
bool isSimpleType() const
Returns true if the encoded type is a simple type, otherwise false.
std::string getEncodedMemoryValueAsString(MLuint64 dataPos, DMEncodedStructureType encType, const std::string &groupPrefix="", bool getAsChars=false) const
Same as above, but for structures the strcutInfoPos is determined automatically.
DMEncodedStructureType getDataType() const
If isStructure() is false it returns DM_Undefined, if isStructure() is true then it returns the data ...
std::string getEncodedMemoryValueAsString(MLuint64 dataPos, DMEncodedStructureType encType, MLuint64 structInfoPos, const std::string &groupPrefix="", bool getAsChars=false) const
Return the value of type encType as string or "" on any error.
MLuint64 getEncodedSimpleTypeByteSize(DMEncodedStructureType encType) const
Returns the byte size of the encoded simple, on arrays, structs or bad types it returns 0.
MLuint64 getTagTypeSizeOf() const
Returns the file format dependent size in bytes of the entry containing the data type of the tag.
MLuint64 getEmptyStructEntrySizeOf() const
Returns the file format dependent size in bytes of the structure info entry perhaps describing the le...
MLuint64 numInfoArrayEntries() const
Reads the length of definition of encoded type.
MLuint64 getDataSectionPosition() const
If isStructure() or isSimpleType is true it returns the position of the start of the value section of...
bool isStringType() const
Returns true if the encoded type is a string, otherwise false.
MLint64 getSimpleTypeValueAsMLint64(MLuint64 byteOffset=0) const
If isSimpleType() is true it returns the value entry as MLint64, otherwise ML_INT64_MAX.
MLuint64 getLengthOfStructureGroupNameSizeOf() const
Returns the file format dependent size in bytes of a structure info entry describing perhaps the leng...
std::string calculateStructValueAsString(MLuint64 structDescPos, MLuint64 structDataPos, const std::string &groupPrefix) const
Converts a structure entry to a string.
bool isStructure() const
Returns true if the encoded type is a structure, otherwise false.
void * getValueAsMemoryChunk(MLuint64 &numBytes) ML_RETURN_VALUE_SHOULD_BE_USED
Returns the value section of the tag as memory chunk; the return value must be freed with MLFree.
MLuint64 getDataSectionSize() const
If isStructure() is true it returns the byte size of the data section of the structure,...
MLuint64 getPositionAfterEnd() const
If isStructure() or isSimpleType() is returns the file position after the end of the simple type or t...
DMEncodedStructureType getStructureFieldType(MLuint64 structFieldIndex) const
If isStructure() is false it returns DM_Undefined, if isStructure() is true then it returns the n'th ...
double getSimpleTypeValueAsDouble(MLuint64 byteOffset=0) const
If isSimpleType() is true it returns the value entry as double, otherwise ML_DOUBLE_MAX.
MLuint64 getNInfoSizeOf() const
Returns the file format dependent size in bytes of the entry containing the size of the info array.
MLuint64 getStructureValueEntryByteSize(MLuint64 structFieldIndex) const
If isStructure() is true then it returns the byte size value entry structFieldIndex,...
bool isComplexArray() const
Returns true if the encoded type is a complex array, otherwise false.
std::string getAsString(const std::string &prefix="", const std::string &sep=", ", const std::string &groupPrefix="", const size_t maxNumBinaryEntries=8, const size_t maxNumStringEntries=20) const
Convert content to a human readable string with the prefix prefix before all lines and separator sep ...
MLuint64 getNumberOfEntriesInGroupSizeOf() const
Returns the file format dependent size in bytes of the structure info entry describing the number of ...
bool isValidStructType(MLuint64 typeVal) const
Returns true if typeVal is a valid type allowed in a structure, otherwise false.
MLuint64 getFourPercentSizeOf() const
Returns the file format dependent size in bytes of the "%%%%" code.
std::string getSimpleTypeValueAsString(const std::string &groupPrefix="") const
If isSimpleType() is true it returns the value entry as string, otherwise an "".
MLuint64 getSimpleTypeValueAsMLuint64(MLuint64 byteOffset=0) const
If isSimpleType() is true it returns the value entry as MLuint64, otherwise ML_UINT64_MAX.
MLuint64 calculateStructureSize(MLuint64 pos) const
Determines the size of a structure in bytes which is described at position pos where the structure ty...
Project wide definitions.
UINT64 MLuint64
Introduce platform independent 64 bit unsigned integer type.
INT64 MLint64
Include 64 bit integer support for Windows or Unix.
MLDMFileReader_EXPORT std::ostream & operator<<(std::ostream &os, const DMTagData &obj)
Output to std::ostream.
DMEncodedStructureType
Enumerator describing the encoded type; the enumerator value is the same as the stored value in file.