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 <FMEThirdPartyWarningsDisable.h>
19#include <string>
20#include <FMEThirdPartyWarningsRestore.h>
21
23
24//----------------------------------------------------------------------------------
26//----------------------------------------------------------------------------------
28public:
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
76private:
78 std::string _fileName;
79
81 std::string _formatName;
82};
83
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 & getFileName() const
Get the file name 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 & getFormatName() const
Get the name of the file format 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:596
MLint32 MLErrorCode
Type of an ML Error code.
Definition mlTypeDefs.h:716
Target mlrange_cast(Source arg)
Generic version of checked ML casts.