MeVisLab Toolbox Reference
XYLibHeader.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 #include "XYLibHeader.h"
15 #include <mlModuleIncludes.h>
16 #include <mlTypeDefs.h>
17 
18 #include <ThirdPartyWarningsDisable.h>
19 #include <string>
20 #include <ThirdPartyWarningsRestore.h>
21 
22 ML_START_NAMESPACE
23 
24 //----------------------------------------------------------------------------------
26 //----------------------------------------------------------------------------------
28 public:
29 
32 
34  void clear();
35 
37  const std::string &getFileName() const;
38 
40  const std::string &getFormatName() const;
41 
44  MLErrorCode loadHeader(const std::string &fileName);
45 
48  ImageVector getImageExtent(double &minVal, double &maxVal) const;
49 
52 
55 
57  std::string getDataTypeAsString() const;
58 
60  std::string getMetaDataDump() const;
61 
75 
76 private:
78  std::string _fileName;
79 
81  std::string _formatName;
82 };
83 
84 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLXYLibReaderPlugin_EXPORT
DLL export macro definition.
Interface of a header loader for Fraunhofer EZRT (.raw and .rek) images.
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
Definition: mlSubImage.h:75
Header information loader for files supported by xylib.
Definition: XYLibHeader.h:27
std::string getMetaDataDump() const
Get the meta data of the file as string dump.
const std::string & getFormatName() const
Get the name of the file format of the currently loaded header.
void clear()
Clears the file name and the data buffer to the construction state.
XYLibHeader()
Constructor.
ImageVector getImageExtent(double &minVal, double &maxVal) const
Returns the extent of the (sub)image, (0,0,0,0,0,0) if cleaned, not loaded files, on errors,...
MLErrorCode loadHeader(const std::string &fileName)
Loads the header from file and returns ML_RESULT_OK on success, otherwise an error code describing th...
MLErrorCode fillSubImage(SubImage &dstSubImage)
Copy overlapping regions in dstSubImage with image data from the loaded file; note that the calculati...
Vector3 getVoxelSize() const
Returns the voxel size of the image in mm, (1,1,1) if cleaned, not loaded, or on error.
std::string getDataTypeAsString() const
Get the data type of the image as descriptive string, "INVALID_DATA_TYPE" if cleaned,...
const std::string & getFileName() const
Get the file name of the currently loaded header.
MLDataType getDataType() const
Get the data type of the image as ML data type, ML_INVALID_DATA_TYPE if cleaned, not loaded,...
MLint32 MLDataType
MLDataType.
Definition: mlTypeDefs.h:684
MLint32 MLErrorCode
Type of an ML Error code.
Definition: mlTypeDefs.h:818