UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-11-21)
|
#include <visp3/ustk_core/usImageSettingsXmlParser.h>
Public Member Functions | |
usImageSettingsXmlParser () | |
usImageSettingsXmlParser (const usImageSettingsXmlParser &twinparser) | |
usImageSettingsXmlParser & | operator= (const usImageSettingsXmlParser &twinparser) |
virtual | ~usImageSettingsXmlParser () |
double | getAxialResolution () const |
double | getFrameNumber () const |
std::string | getImageFileName () const |
double | getHeightResolution () const |
us::ImageType | getImageType () const |
usMotorSettings | getMotorSettings () const |
unsigned int | getScanLineNumber () const |
double | getSequenceFrameRate () const |
int | getSequenceStartNumber () const |
int | getSequenceStopNumber () const |
double | getSpacingX () const |
double | getSpacingY () const |
double | getSpacingZ () const |
double | getWidthResolution () const |
usTransducerSettings | getTransducerSettings () const |
bool | isImage3D () const |
bool | isSequence () const |
void | setFrameNumber (unsigned int frameNumber) |
void | setImageFileName (const std::string &imageFileName) |
void | setImageSettings (double transducerRadius, double scanLinePitch, bool isTransducerConvex, double axialResolution, us::ImageType image_type, int samplingFrequency, int transmitFrequency) |
void | setImageSettings (double transducerRadius, double scanLinePitch, bool isTransducerConvex, unsigned int scanLineNumber, double widthResolution, double heightResolution, int samplingFrequency, int transmitFrequency) |
void | setImageType (us::ImageType image_type) |
void | setMotorSettings (const usMotorSettings &motorSettings) |
void | setScanLineNumber (unsigned int scanLineNumber) |
void | setSequenceFrameRate (double sequenceFrameRate) |
void | setSequenceStartNumber (int sequenceStartNumber) |
void | setSequenceStopNumber (int sequenceStopNumber) |
void | setSequenceType (bool isSequence) |
void | setSpacing (double spacingX, double spacingY, double spacingZ) |
void | setTransducerSettings (const usTransducerSettings transducerSettings) |
Protected Member Functions | |
void | readMainClass (xmlDocPtr doc, xmlNodePtr node) |
void | writeMainClass (xmlNodePtr node) |
Input/output operations between ultrasound image settings and the assiciated xml files.
Definition at line 62 of file usImageSettingsXmlParser.h.
Enumerator | |
---|---|
SEQUENCE_OK | |
SEQUENCE_ERROR |
Definition at line 98 of file usImageSettingsXmlParser.h.
Definition at line 71 of file usImageSettingsXmlParser.h.
usImageSettingsXmlParser::usImageSettingsXmlParser | ( | ) |
Default constructor.
Definition at line 44 of file usImageSettingsXmlParser.cpp.
References CODE_XML_ASSOCIATED_IMAGE_FILE_NAME, CODE_XML_AXIAL_RESOLUTION, CODE_XML_FRAME_NUMBER, CODE_XML_FRAME_PITCH, CODE_XML_HEIGHT_RESOLUTION, CODE_XML_IMAGE_TYPE, CODE_XML_IS_TRANSDUCER_CONVEX, CODE_XML_MOTOR_RADIUS, CODE_XML_MOTOR_TYPE, CODE_XML_SAMPLING_FREQUENCY, CODE_XML_SCANLINE_NUMBER, CODE_XML_SCANLINE_PITCH, CODE_XML_SEQUENCE_FIRST_IMAGE_NUMBER, CODE_XML_SEQUENCE_FRAME_RATE, CODE_XML_SEQUENCE_LAST_IMAGE_NUMBER, CODE_XML_SETTINGS, CODE_XML_SPACING_X, CODE_XML_SPACING_Y, CODE_XML_SPACING_Z, CODE_XML_TRANSDUCER_RADIUS, CODE_XML_TRANSMIT_FREQUENCY, and CODE_XML_WIDTH_RESOLUTION.
usImageSettingsXmlParser::usImageSettingsXmlParser | ( | const usImageSettingsXmlParser & | twinparser | ) |
Copy constructor.
Definition at line 76 of file usImageSettingsXmlParser.cpp.
|
virtual |
Destructor.
Definition at line 106 of file usImageSettingsXmlParser.cpp.
|
inline |
Definition at line 101 of file usImageSettingsXmlParser.h.
Referenced by operator=(), and usImageIo::read().
|
inline |
Definition at line 102 of file usImageSettingsXmlParser.h.
|
inline |
Definition at line 104 of file usImageSettingsXmlParser.h.
Referenced by operator=(), and usImageIo::read().
|
inline |
Definition at line 103 of file usImageSettingsXmlParser.h.
Referenced by operator=(), and usImageIo::read().
|
inline |
Definition at line 105 of file usImageSettingsXmlParser.h.
Referenced by operator=().
|
inline |
Definition at line 106 of file usImageSettingsXmlParser.h.
Referenced by operator=(), and usImageIo::read().
|
inline |
Definition at line 107 of file usImageSettingsXmlParser.h.
|
inline |
Definition at line 108 of file usImageSettingsXmlParser.h.
|
inline |
Definition at line 109 of file usImageSettingsXmlParser.h.
|
inline |
Definition at line 110 of file usImageSettingsXmlParser.h.
|
inline |
Definition at line 111 of file usImageSettingsXmlParser.h.
Referenced by operator=().
|
inline |
Definition at line 112 of file usImageSettingsXmlParser.h.
Referenced by operator=().
|
inline |
Definition at line 113 of file usImageSettingsXmlParser.h.
Referenced by operator=().
|
inline |
Definition at line 115 of file usImageSettingsXmlParser.h.
Referenced by operator=(), and usImageIo::read().
|
inline |
Definition at line 114 of file usImageSettingsXmlParser.h.
Referenced by operator=(), and usImageIo::read().
|
inline |
Definition at line 117 of file usImageSettingsXmlParser.h.
Referenced by operator=().
|
inline |
Definition at line 118 of file usImageSettingsXmlParser.h.
usImageSettingsXmlParser & usImageSettingsXmlParser::operator= | ( | const usImageSettingsXmlParser & | twinparser | ) |
Assignement operator.
twinparser | usImageSettingsXmlParser to assign. |
Definition at line 86 of file usImageSettingsXmlParser.cpp.
References getAxialResolution(), getHeightResolution(), getImageFileName(), getImageType(), getMotorSettings(), getSpacingX(), getSpacingY(), getSpacingZ(), getTransducerSettings(), getWidthResolution(), and isImage3D().
|
protected |
Reading method, called by vpXmlParser::parse().
doc | a pointer representing the document |
node | : the root node of the document |
Definition at line 113 of file usImageSettingsXmlParser.cpp.
References CODE_XML_ASSOCIATED_IMAGE_FILE_NAME, CODE_XML_AXIAL_RESOLUTION, CODE_XML_FRAME_PITCH, CODE_XML_HEIGHT_RESOLUTION, CODE_XML_IMAGE_TYPE, CODE_XML_IS_TRANSDUCER_CONVEX, CODE_XML_MOTOR_RADIUS, CODE_XML_MOTOR_TYPE, CODE_XML_SAMPLING_FREQUENCY, CODE_XML_SCANLINE_NUMBER, CODE_XML_SCANLINE_PITCH, CODE_XML_SEQUENCE_FIRST_IMAGE_NUMBER, CODE_XML_SEQUENCE_FRAME_RATE, CODE_XML_SEQUENCE_LAST_IMAGE_NUMBER, CODE_XML_SPACING_X, CODE_XML_SPACING_Y, CODE_XML_SPACING_Z, CODE_XML_TRANSDUCER_RADIUS, CODE_XML_TRANSMIT_FREQUENCY, CODE_XML_WIDTH_RESOLUTION, usMotorSettings::LinearMotor, us::POSTSCAN_2D, us::PRESCAN_2D, us::RF_2D, usMotorSettings::RotationalMotor, usMotorSettings::setFramePitch(), usMotorSettings::setMotorRadius(), usMotorSettings::setMotorType(), usTransducerSettings::setSamplingFrequency(), usTransducerSettings::setScanLineNumber(), usTransducerSettings::setScanLinePitch(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), usTransducerSettings::setTransmitFrequency(), and usMotorSettings::TiltingMotor.
|
inline |
Definition at line 121 of file usImageSettingsXmlParser.h.
void usImageSettingsXmlParser::setImageFileName | ( | const std::string & | imageFileName | ) |
Setter for image file name associated to the settings wrote in the xml file.
imageFileName | : image file name with extestion. |
Definition at line 392 of file usImageSettingsXmlParser.cpp.
Referenced by usSequenceWriter< ImageType >::close(), and usImageIo::write().
void usImageSettingsXmlParser::setImageSettings | ( | double | transducerRadius, |
double | scanLinePitch, | ||
bool | isTransducerConvex, | ||
double | axialResolution, | ||
us::ImageType | image_type, | ||
int | samplingFrequency, | ||
int | transmitFrequency | ||
) |
Setter for pre-scan settings. Each transducer setting available.
transducerRadius | : the Transducer rabius. |
scanLinePitch | : the scan line pitch. |
isTransducerConvex | : the transducer type (true if convex transducer, false if linear). |
axialResolution | : the image axial resolution. |
image_type | : image type (rf or pre-scan). |
samplingFrequency | : frequency used to sample the ultrasound wave during the acquisition. |
transmitFrequency | : frequency of the ultrasound wave used to create the image. |
Definition at line 335 of file usImageSettingsXmlParser.cpp.
References us::PRESCAN_2D, us::RF_2D, usTransducerSettings::setSamplingFrequency(), usTransducerSettings::setScanLinePitch(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), and usTransducerSettings::setTransmitFrequency().
Referenced by usSequenceWriter< ImageType >::close(), and usImageIo::write().
void usImageSettingsXmlParser::setImageSettings | ( | double | transducerRadius, |
double | scanLinePitch, | ||
bool | isTransducerConvex, | ||
unsigned int | scanLineNumber, | ||
double | widthResolution, | ||
double | heightResolution, | ||
int | samplingFrequency, | ||
int | transmitFrequency | ||
) |
Setter for post-scan settings. Each transducer setting available.
transducerRadius | : the transducer rabius. |
scanLinePitch | : the scan line pitch. |
isTransducerConvex | : the transducer type (true if convex transducer, false if linear). |
scanLineNumber | : the number of scan lines of the probe used. |
widthResolution | : the image width resolution. |
heightResolution | : the image height resolution. |
samplingFrequency | : frequency used to sample the ultrasound wave during the acquisition. |
transmitFrequency | : frequency of the ultrasound wave used to create the image. |
Definition at line 363 of file usImageSettingsXmlParser.cpp.
References us::POSTSCAN_2D, usTransducerSettings::setSamplingFrequency(), usTransducerSettings::setScanLineNumber(), usTransducerSettings::setScanLinePitch(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), and usTransducerSettings::setTransmitFrequency().
|
inline |
Definition at line 128 of file usImageSettingsXmlParser.h.
Referenced by usSequenceWriter< ImageType >::close(), and usImageIo::write().
void usImageSettingsXmlParser::setMotorSettings | ( | const usMotorSettings & | motorSettings | ) |
Setter for motor settings (3D images).
motorSettings | : motor settings to write in the xml file. |
Definition at line 382 of file usImageSettingsXmlParser.cpp.
|
inline |
Definition at line 130 of file usImageSettingsXmlParser.h.
|
inline |
Definition at line 131 of file usImageSettingsXmlParser.h.
Referenced by usSequenceWriter< ImageType >::close().
|
inline |
Definition at line 136 of file usImageSettingsXmlParser.h.
Referenced by usSequenceWriter< ImageType >::close().
|
inline |
Definition at line 141 of file usImageSettingsXmlParser.h.
Referenced by usSequenceWriter< ImageType >::close().
|
inline |
Definition at line 146 of file usImageSettingsXmlParser.h.
|
inline |
Definition at line 147 of file usImageSettingsXmlParser.h.
void usImageSettingsXmlParser::setTransducerSettings | ( | const usTransducerSettings | transducerSettings | ) |
|
protected |
Writing method, called by vpXmlParser::save().
node | : the root node of the document |
Definition at line 266 of file usImageSettingsXmlParser.cpp.
References usMotorSettings::getFrameNumber(), usMotorSettings::getFramePitch(), usMotorSettings::getMotorRadius(), usMotorSettings::getMotorType(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usTransducerSettings::getTransmitFrequency(), usTransducerSettings::isTransducerConvex(), usMotorSettings::LinearMotor, us::POSTSCAN_2D, us::PRESCAN_2D, us::RF_2D, usMotorSettings::RotationalMotor, and usMotorSettings::TiltingMotor.