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
77 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80 std::string MHDFileName;
81 std::string rawFileName;
82 unsigned int numberOfDimensions;
84 ElementType elementType;
86 double elementSpacing[4];
91 bool isTransducerConvex;
93 double transducerRadius;
97 unsigned int scanLineNumber;
98 unsigned int frameNumber;
99 int transmitFrequency;
100 int samplingFrequency;
101 std::vector<uint64_t> timestamp;
106 usMetaHeaderParser();
107 usMetaHeaderParser(
const std::string &MHDFilename);
109 virtual ~usMetaHeaderParser();
112 double getAxialResolution()
const {
return m_axialResolution; }
113 ElementType getElementType()
const {
return header.elementType; }
114 double getHeightResolution()
const {
return m_heightResolution; }
115 us::ImageType getImageType()
const {
return header.imageType; }
116 MHDHeader getMHDHeader()
const {
return header; }
118 std::string getRawFileName()
const {
return header.rawFileName; }
120 double getWidthResolution()
const {
return m_widthResolution; }
123 bool operator==(usMetaHeaderParser
const &other);
127 void read(
const std::string &filename);
128 void readMHDHeader(
const std::string &fileName);
131 void setAxialResolution(
const double axialresolution);
132 void setHeightResolution(
const double heightResolution);
133 void setImageFileName(
const std::string &imageFileName);
134 void setImageTimestamp(
const std::vector<uint64_t> timestamp);
135 void setMHDHeader(MHDHeader header);
137 void setRawFileName(
const std::string &rawFileName);
139 void setWidthResolution(
const double widthResolution);
144 double m_axialResolution;
145 double m_heightResolution;
146 double m_widthResolution;
149 std::map<std::string, int> imageTypeMap;
150 std::map<std::string, int> elementTypeMap;
151 std::map<int, std::string> imageTypeReverseMap;
152 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 ...