33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 #ifndef __usMetaHeaderParser_h_
40 #define __usMetaHeaderParser_h_
51 #include <visp3/core/vpConfig.h>
52 #include <visp3/ustk_core/us.h>
53 #include <visp3/ustk_core/usImagePostScan2D.h>
54 #include <visp3/ustk_core/usImagePostScan3D.h>
55 #include <visp3/ustk_core/usImagePreScan2D.h>
56 #include <visp3/ustk_core/usImagePreScan3D.h>
57 #include <visp3/ustk_core/usImageRF2D.h>
58 #include <visp3/ustk_core/usImageRF3D.h>
65 class VISP_EXPORT usMetaHeaderParser
76 #ifndef DOXYGEN_SHOULD_SKIP_THIS
78 std::string MHDFileName;
79 std::string rawFileName;
80 unsigned int numberOfDimensions;
82 ElementType elementType;
84 double elementSpacing[4];
89 bool isTransducerConvex;
91 double transducerRadius;
95 unsigned int scanLineNumber;
96 unsigned int frameNumber;
97 int transmitFrequency;
98 int samplingFrequency;
99 std::vector<uint64_t> timestamp;
104 usMetaHeaderParser();
105 usMetaHeaderParser(
const std::string &MHDFilename);
107 virtual ~usMetaHeaderParser();
110 double getAxialResolution()
const {
return m_axialResolution; }
111 ElementType getElementType()
const {
return header.elementType; }
112 double getHeightResolution()
const {
return m_heightResolution; }
113 us::ImageType getImageType()
const {
return header.imageType; }
114 MHDHeader getMHDHeader()
const {
return header; }
116 std::string getRawFileName()
const {
return header.rawFileName; }
118 double getWidthResolution()
const {
return m_widthResolution; }
121 bool operator==(usMetaHeaderParser
const &other);
125 void read(
const std::string &filename);
126 void readMHDHeader(
const std::string &fileName);
129 void setAxialResolution(
const double axialresolution);
130 void setHeightResolution(
const double heightResolution);
131 void setImageFileName(
const std::string &imageFileName);
132 void setImageTimestamp(
const std::vector<uint64_t> timestamp);
133 void setMHDHeader(MHDHeader header);
135 void setRawFileName(
const std::string &rawFileName);
137 void setWidthResolution(
const double widthResolution);
142 double m_axialResolution;
143 double m_heightResolution;
144 double m_widthResolution;
147 std::map<std::string, int> imageTypeMap;
148 std::map<std::string, int> elementTypeMap;
149 std::map<int, std::string> imageTypeReverseMap;
150 std::map<int, std::string> elementTypeReverseMap;
Generic class for 3D ultrasound motor settings associated to the 3D probe used during acquisition.
Generic class for 2D ultrasound data common settings associated to the type of probe transducer used ...