38 #ifndef __usImageSettingsXmlParser_h_
39 #define __usImageSettingsXmlParser_h_
41 #include <visp3/core/vpConfig.h>
47 #include <visp3/core/vpDebug.h>
48 #include <visp3/core/vpIoTools.h>
49 #include <visp3/core/vpXmlParser.h>
50 #include <visp3/io/vpParseArgv.h>
51 #include <visp3/ustk_core/us.h>
52 #include <visp3/ustk_core/usImagePostScan2D.h>
53 #include <visp3/ustk_core/usImagePreScan2D.h>
54 #include <visp3/ustk_core/usMotorSettings.h>
55 #include <visp3/ustk_core/usTransducerSettings.h>
99 typedef enum { SEQUENCE_OK, SEQUENCE_ERROR } vpXmlCodeSequenceType;
122 void setFrameNumber(
unsigned int frameNumber) { m_motorSettings.setFrameNumber(frameNumber); }
123 void setImageFileName(
const std::string &imageFileName);
124 void setImageSettings(
double transducerRadius,
double scanLinePitch,
bool isTransducerConvex,
double axialResolution,
125 us::ImageType image_type,
int samplingFrequency,
int transmitFrequency);
126 void setImageSettings(
double transducerRadius,
double scanLinePitch,
bool isTransducerConvex,
127 unsigned int scanLineNumber,
double widthResolution,
double heightResolution,
128 int samplingFrequency,
int transmitFrequency);
131 void setScanLineNumber(
unsigned int scanLineNumber) { m_transducerSettings.setScanLineNumber(scanLineNumber); }
134 m_sequence_frame_rate = sequenceFrameRate;
135 m_is_sequence =
true;
139 m_sequence_start = sequenceStartNumber;
140 m_is_sequence =
true;
144 m_sequence_stop = sequenceStopNumber;
145 m_is_sequence =
true;
148 void setSpacing(
double spacingX,
double spacingY,
double spacingZ)
150 m_spacingX = spacingX;
151 m_spacingY = spacingY;
152 m_spacingZ = spacingZ;
161 double m_widthResolution;
162 double m_heightResolution;
170 double m_axialResolution;
175 std::string m_imageFileName;
182 double m_sequence_frame_rate;
183 std::string m_sequence_name;
184 int m_sequence_start;
188 void readMainClass(xmlDocPtr doc, xmlNodePtr node);
189 void writeMainClass(xmlNodePtr node);
Input/output operations between ultrasound image settings and the associated xml files.
double getSpacingX() const
void setTransducerSettings(const usTransducerSettings transducerSettings)
void setSequenceType(bool isSequence)
int getSequenceStopNumber() const
void setSpacing(double spacingX, double spacingY, double spacingZ)
double getWidthResolution() const
unsigned int getScanLineNumber() const
usMotorSettings getMotorSettings() const
double getSpacingY() const
void setImageType(us::ImageType image_type)
us::ImageType getImageType() const
int getSequenceStartNumber() const
void setScanLineNumber(unsigned int scanLineNumber)
usTransducerSettings getTransducerSettings() const
double getFrameNumber() const
double getSequenceFrameRate() const
std::string getImageFileName() const
@ CODE_XML_HEIGHT_RESOLUTION
@ CODE_XML_SAMPLING_FREQUENCY
@ CODE_XML_SCANLINE_NUMBER
@ CODE_XML_SCANLINE_PITCH
@ CODE_XML_WIDTH_RESOLUTION
@ CODE_XML_TRANSDUCER_RADIUS
@ CODE_XML_SEQUENCE_FRAME_RATE
@ CODE_XML_AXIAL_RESOLUTION
@ CODE_XML_SEQUENCE_LAST_IMAGE_NUMBER
@ CODE_XML_IS_TRANSDUCER_CONVEX
@ CODE_XML_ASSOCIATED_IMAGE_FILE_NAME
@ CODE_XML_TRANSMIT_FREQUENCY
@ CODE_XML_SEQUENCE_FIRST_IMAGE_NUMBER
double getHeightResolution() const
void setSequenceStartNumber(int sequenceStartNumber)
double getAxialResolution() const
void setFrameNumber(unsigned int frameNumber)
double getSpacingZ() const
void setSequenceStopNumber(int sequenceStopNumber)
void setSequenceFrameRate(double sequenceFrameRate)
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 ...