UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-11-21)
|
#include <visp3/ustk_core/usImageIo.h>
Static Public Member Functions | |
RF io | |
static void | read (usImageRF2D< short int > &imageRf2D, const std::string &headerFileName) |
static void | read (usImageRF3D< short > &rfImage3D, const std::string &headerFileName) |
static void | write (const usImageRF2D< short > &rfImage, const std::string &headerFileName, const std::string &imageExtension2D) |
static void | write (const usImageRF2D< short > &rfImage, const std::string &headerFileName) |
static void | write (const usImageRF3D< short > &rfImage3D, const std::string &headerFileName, const std::string &imageExtension2D) |
static void | write (const usImageRF3D< short > &rfImage3D, const std::string &headerFileName) |
Pre-scan io | |
static void | read (usImagePreScan2D< unsigned char > &preScanImage, const std::string &headerFileName) |
static void | read (usImagePreScan3D< unsigned char > &preScanImage3D, const std::string &headerFileName) |
static void | read (usImagePreScan2D< double > &preScanImage, const std::string &headerFileName) |
static void | read (usImagePreScan3D< double > &preScanImage3D, const std::string &headerFileName) |
static void | write (const usImagePreScan2D< unsigned char > &preScanImage, const std::string &headerFileName, const std::string &imageExtension2D) |
static void | write (const usImagePreScan2D< unsigned char > &preScanImage, const std::string &headerFileName) |
static void | write (const usImagePreScan3D< unsigned char > &preScanImage3D, const std::string &headerFileName, const std::string &imageExtension2D) |
static void | write (const usImagePreScan3D< unsigned char > &preScanImage3D, const std::string &headerFileName) |
static void | write (const usImagePreScan2D< double > &preScanImage, const std::string &headerFileName, const std::string &imageExtension2D) |
static void | write (const usImagePreScan2D< double > &preScanImage, const std::string &headerFileName) |
static void | write (const usImagePreScan3D< double > &preScanImage3D, const std::string &headerFileName, const std::string &imageExtension2D) |
static void | write (const usImagePreScan3D< double > &preScanImage3D, const std::string &headerFileName) |
Post-scan io | |
enum | usHeaderFormatType { FORMAT_XML , FORMAT_MHD , FORMAT_VOL , FORMAT_RF , HEADER_FORMAT_UNKNOWN } |
static void | read (usImagePostScan2D< unsigned char > &postScanImage, const std::string &headerFileName) |
static void | read (usImagePostScan3D< unsigned char > &postScanImage3D, const std::string &headerFileName) |
static void | write (const usImagePostScan2D< unsigned char > &postScanImage, const std::string &headerFileName, const std::string &imageExtension2D) |
static void | write (const usImagePostScan2D< unsigned char > &postScanImage, const std::string &headerFileName) |
static void | write (const usImagePostScan3D< unsigned char > &postScanImage3D, const std::string &headerFileName, const std::string &imageExtension2D) |
static void | write (const usImagePostScan3D< unsigned char > &postScanImage3D, const std::string &headerFileName) |
static usHeaderFormatType | getHeaderFormat (const std::string &headerfilename) |
Input/output operations between ultrasound data and files (header + image file).
Definition at line 59 of file usImageIo.h.
Enumerator | |
---|---|
FORMAT_XML | |
FORMAT_MHD | |
FORMAT_VOL | |
FORMAT_RF | |
HEADER_FORMAT_UNKNOWN |
Definition at line 152 of file usImageIo.h.
|
static |
Definition at line 50 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_RF, FORMAT_VOL, FORMAT_XML, and HEADER_FORMAT_UNKNOWN.
Referenced by usMHDSequenceReader::acquire(), usMHDSequenceReader::getImage(), read(), and write().
|
static |
Read 2D post-scan ultrasound image.
[out] | postScanImage | The post-scan image to read. |
[in] | headerFileName | The header file name. |
Definition at line 839 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), usImageSettingsXmlParser::getHeightResolution(), usImageSettingsXmlParser::getImageFileName(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usImageSettingsXmlParser::getTransducerSettings(), usTransducerSettings::getTransmitFrequency(), usImageSettingsXmlParser::getWidthResolution(), usTransducerSettings::isTransducerConvex(), us::NOT_SET, us::POSTSCAN_2D, usImagePostScan2D< Type >::setHeightResolution(), usTransducerSettings::setSamplingFrequency(), usTransducerSettings::setScanLineNumber(), usTransducerSettings::setScanLinePitch(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), usTransducerSettings::setTransmitFrequency(), and usImagePostScan2D< Type >::setWidthResolution().
|
static |
Read 3D post-scan ultrasound image
[out] | postScanImage | The post-scan image to read. |
[in] | headerFileName | The header file name with extenstion. |
Definition at line 978 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), us::NOT_SET, us::POSTSCAN_3D, usImage3D< Type >::resize(), usImagePostScan3D< Type >::setElementSpacingX(), usImagePostScan3D< Type >::setElementSpacingY(), usImagePostScan3D< Type >::setElementSpacingZ(), usMotorSettings::setFrameNumber(), usMotorSettings::setFramePitch(), usMotorSettings::setMotorRadius(), usMotorSettings::setMotorType(), usTransducerSettings::setSamplingFrequency(), usTransducerSettings::setScanLineNumber(), usTransducerSettings::setScanLinePitch(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), and usTransducerSettings::setTransmitFrequency().
|
static |
Read 2D double pre-scan ultrasound image.
[out] | preScan2D | The pre-scan image to read. |
[in] | headerFileName | The header file name to read. |
Definition at line 710 of file usImageIo.cpp.
|
static |
Read 2D unsigned char pre-scan ultrasound image.
[out] | preScanImage | The pre-scan image to read. |
[in] | headerFileName | The header file name to read, with extension. |
Definition at line 410 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, usImagePreScanSettings::getAxialResolution(), usImageSettingsXmlParser::getAxialResolution(), getHeaderFormat(), usImageSettingsXmlParser::getImageFileName(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usImageSettingsXmlParser::getTransducerSettings(), usTransducerSettings::getTransmitFrequency(), usTransducerSettings::isTransducerConvex(), us::NOT_SET, us::PRESCAN_2D, usImagePreScan2D< Type >::resize(), usImagePreScanSettings::setAxialResolution(), usTransducerSettings::setDepth(), usImagePreScanSettings::setImagePreScanSettings(), usTransducerSettings::setSamplingFrequency(), usImagePreScan2D< Type >::setScanLineNumber(), usTransducerSettings::setScanLinePitch(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), and usTransducerSettings::setTransmitFrequency().
|
static |
Read 3D double pre-scan ultrasound image.
[out] | preScan3DImage | The pre-scan image to read. |
[in] | headerFileName | The header file name to read. |
Definition at line 737 of file usImageIo.cpp.
|
static |
Read 3D unsigned char pre-scan ultrasound image.
[out] | preScanImage | The pre-scan image to read. |
[in] | headerFileName | The header file name to read, with header extension. |
Definition at line 552 of file usImageIo.cpp.
References usSequenceReader< ImageType >::acquire(), usSequenceReader< ImageType >::end(), FORMAT_MHD, FORMAT_VOL, FORMAT_XML, usImagePreScan2D< Type >::getBModeSampleNumber(), usSequenceReader< ImageType >::getFrameCount(), getHeaderFormat(), usImageSettingsXmlParser::getMotorSettings(), usTransducerSettings::getScanLineNumber(), usSequenceReader< ImageType >::getXmlParser(), usImagePreScan3D< Type >::insertFrame(), us::NOT_SET, usSequenceReader< ImageType >::open(), us::PRESCAN_3D, usImagePreScan3D< Type >::resize(), usImagePreScanSettings::setAxialResolution(), usTransducerSettings::setDepth(), usMotorSettings::setFrameNumber(), usMotorSettings::setFramePitch(), usImagePreScanSettings::setImagePreScanSettings(), usMotorSettings::setMotorRadius(), usMotorSettings::setMotorSettings(), usMotorSettings::setMotorType(), usTransducerSettings::setSamplingFrequency(), usTransducerSettings::setScanLineNumber(), usTransducerSettings::setScanLinePitch(), usSequenceReader< ImageType >::setSequenceFileName(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), and usTransducerSettings::setTransmitFrequency().
|
static |
Read 2D rf ultrasound image.
[out] | imageRf2D | The RF image to read. |
[in] | headerFileName | The header file name to read. |
Definition at line 153 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_RF, usImagePreScanSettings::getAxialResolution(), getHeaderFormat(), us::NOT_SET, usImageRF2D< Type >::resize(), us::RF_2D, usImagePreScanSettings::setAxialResolution(), usTransducerSettings::setDepth(), usImagePreScanSettings::setImagePreScanSettings(), usTransducerSettings::setSamplingFrequency(), usTransducerSettings::setScanLinePitch(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), and usTransducerSettings::setTransmitFrequency().
Referenced by usResliceMatrixViewer::openPostScan3D(), us3DSceneSlicing::us3DSceneSlicing(), usMedicalImageViewer::usMedicalImageViewer(), and usResliceMatrixViewer::usResliceMatrixViewer().
|
static |
Read 3D rf ultrasound image.
[out] | imageRf3 | The RF image to read. |
[in] | headerFileName | The header file name to read. |
Definition at line 269 of file usImageIo.cpp.
References FORMAT_MHD, getHeaderFormat(), us::NOT_SET, usImageRF3D< Type >::resize(), us::RF_3D, usImagePreScanSettings::setAxialResolution(), usTransducerSettings::setDepth(), usMotorSettings::setFrameNumber(), usMotorSettings::setFramePitch(), usImagePreScanSettings::setImagePreScanSettings(), usMotorSettings::setMotorRadius(), usMotorSettings::setMotorSettings(), usMotorSettings::setMotorType(), usTransducerSettings::setSamplingFrequency(), usTransducerSettings::setScanLineNumber(), usTransducerSettings::setScanLinePitch(), usTransducerSettings::setTransducerConvexity(), usTransducerSettings::setTransducerRadius(), and usTransducerSettings::setTransmitFrequency().
|
static |
Write 2D post-scan ultrasound image and settings.
postScanImage | Image to write. |
headerFileName | The header file name with the desired extension. |
Definition at line 749 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().
|
static |
Write 2D post-scan ultrasound image and settings.
postScanImage | Image to write. |
headerFileName | The header file name with the desired extension. |
imageExtension2D | The 2D image extension. |
Definition at line 766 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), usImagePostScan2D< Type >::getHeightResolution(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usTransducerSettings::getTransmitFrequency(), usImagePostScan2D< Type >::getWidthResolution(), usTransducerSettings::isTransducerConvex(), us::POSTSCAN_2D, usImageSettingsXmlParser::setImageFileName(), usImageSettingsXmlParser::setImageSettings(), and usImageSettingsXmlParser::setImageType().
|
static |
Write 3D post-scan ultrasound image and settings
postScanImage | Image to write. |
headerFileName | The header file name. |
Definition at line 902 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().
|
static |
Write 3D post-scan ultrasound image and settings
postScanImage | Image to write. |
headerFileName | The header file name. |
imageExtension2D | The 2D image extension. |
Definition at line 919 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, usImagePostScan3D< Type >::getElementSpacingX(), usImagePostScan3D< Type >::getElementSpacingY(), usImagePostScan3D< Type >::getElementSpacingZ(), usMotorSettings::getFrameNumber(), usMotorSettings::getFramePitch(), getHeaderFormat(), usImage3D< Type >::getHeight(), usMotorSettings::getMotorRadius(), usMotorSettings::getMotorType(), usImage3D< Type >::getNumberOfFrames(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usTransducerSettings::getTransmitFrequency(), usImage3D< Type >::getWidth(), usTransducerSettings::isTransducerConvex(), and us::POSTSCAN_3D.
|
static |
|
static |
Write 2D double pre-scan ultrasound image.
preScan2DImage | The pre-scan image to write. |
headerFileName | The header file name to write. |
imageExtension2D | The 2D image extension. |
Definition at line 696 of file usImageIo.cpp.
|
static |
Write 2D unsigned char pre-scan ultrasound image.
preScanImage | The pre-scan image to write. |
headerFileName | The header file name to write, with extension. |
Definition at line 320 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().
|
static |
Write 2D unsigned char pre-scan ultrasound image.
preScanImage | The pre-scan image to write. |
headerFileName | The header file name to write, with extension. |
imageExtension2D | The image extention name to write (ex : ".png"). |
Definition at line 339 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, usImagePreScanSettings::getAxialResolution(), usImagePreScan2D< Type >::getBModeSampleNumber(), getHeaderFormat(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usTransducerSettings::getTransmitFrequency(), usTransducerSettings::isTransducerConvex(), us::PRESCAN_2D, usImageSettingsXmlParser::setImageFileName(), usImageSettingsXmlParser::setImageSettings(), and usImageSettingsXmlParser::setImageType().
|
static |
|
static |
Write 3D double pre-scan ultrasound image.
preScan3DImage | The pre-scan image to write. |
headerFileName | The header file name to write. |
imageExtension2D | The 2D image extension. |
Definition at line 723 of file usImageIo.cpp.
|
static |
Write 3D unsigned char pre-scan ultrasound image.
preScanImage | The pre-scan image to write. |
headerFileName | The header file name to write. |
Definition at line 475 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().
|
static |
Write 3D unsigned char pre-scan ultrasound image.
preScanImage | The pre-scan image to write. |
headerFileName | The header file name to write. |
imageExtension2D | The 2D image extension. |
Definition at line 492 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, usImagePreScanSettings::getAxialResolution(), usMotorSettings::getFramePitch(), getHeaderFormat(), usImage3D< Type >::getHeight(), usMotorSettings::getMotorRadius(), usMotorSettings::getMotorType(), usImage3D< Type >::getNumberOfFrames(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usTransducerSettings::getTransmitFrequency(), usImage3D< Type >::getWidth(), usTransducerSettings::isTransducerConvex(), and us::PRESCAN_3D.
|
static |
Write 2D rf ultrasound image.
imageRf2D | The RF image to write. |
headerFileName | The header file name to write. |
Definition at line 87 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().
|
static |
Write 2D rf ultrasound image.
imageRf2D | The RF image to write. |
headerFileName | The header file name to write. |
imageExtension2D | The 2D image extension. |
Definition at line 104 of file usImageIo.cpp.
References FORMAT_MHD, usImagePreScanSettings::getAxialResolution(), getHeaderFormat(), usImageRF2D< Type >::getRFSampleNumber(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLineNumber(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usTransducerSettings::getTransmitFrequency(), usTransducerSettings::isTransducerConvex(), and us::RF_2D.
Referenced by usResliceMatrixViewer::getView1Slice(), and write().
|
static |
Write 3D rf ultrasound image.
imageRf3D | The RF image to write. |
headerFileName | The header file name to write. |
Definition at line 200 of file usImageIo.cpp.
References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().
|
static |
Write 3D rf ultrasound image.
imageRf3D | The RF image to write. |
headerFileName | The header file name to write. |
imageExtension3D | The 3D image extension. |
Definition at line 217 of file usImageIo.cpp.
References FORMAT_MHD, usImagePreScanSettings::getAxialResolution(), usMotorSettings::getFramePitch(), getHeaderFormat(), usImageRF3D< Type >::getHeight(), usMotorSettings::getMotorRadius(), usMotorSettings::getMotorType(), usImageRF3D< Type >::getNumberOfFrames(), usTransducerSettings::getSamplingFrequency(), usTransducerSettings::getScanLinePitch(), usTransducerSettings::getTransducerRadius(), usTransducerSettings::getTransmitFrequency(), usImageRF3D< Type >::getWidth(), usTransducerSettings::isTransducerConvex(), and us::RF_3D.