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)
 

Detailed Description

Input/output operations between ultrasound data and files (header + image file).

Definition at line 59 of file usImageIo.h.

Member Enumeration Documentation

◆ usHeaderFormatType

Enumerator
FORMAT_XML 
FORMAT_MHD 
FORMAT_VOL 
FORMAT_RF 
HEADER_FORMAT_UNKNOWN 

Definition at line 152 of file usImageIo.h.

Member Function Documentation

◆ getHeaderFormat()

usImageIo::usHeaderFormatType usImageIo::getHeaderFormat ( const std::string &  headerfilename)
static

◆ read() [1/8]

◆ read() [2/8]

◆ read() [3/8]

void usImageIo::read ( usImagePreScan2D< double > &  preScan2D,
const std::string &  headerFileName 
)
static

Read 2D double pre-scan ultrasound image.

Parameters
[out]preScan2DThe pre-scan image to read.
[in]headerFileNameThe header file name to read.

Definition at line 710 of file usImageIo.cpp.

◆ read() [4/8]

◆ read() [5/8]

void usImageIo::read ( usImagePreScan3D< double > &  preScan3DImage,
const std::string &  headerFileName 
)
static

Read 3D double pre-scan ultrasound image.

Parameters
[out]preScan3DImageThe pre-scan image to read.
[in]headerFileNameThe header file name to read.

Definition at line 737 of file usImageIo.cpp.

◆ read() [6/8]

void usImageIo::read ( usImagePreScan3D< unsigned char > &  preScanImage,
const std::string &  headerFileName 
)
static

◆ read() [7/8]

void usImageIo::read ( usImageRF2D< short int > &  imageRf2D,
const std::string &  headerFileName 
)
static

◆ read() [8/8]

◆ write() [1/16]

void usImageIo::write ( const usImagePostScan2D< unsigned char > &  postScanImage,
const std::string &  headerFileName 
)
static

Write 2D post-scan ultrasound image and settings.

Parameters
postScanImageImage to write.
headerFileNameThe header file name with the desired extension.

Definition at line 749 of file usImageIo.cpp.

References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().

◆ write() [2/16]

void usImageIo::write ( const usImagePostScan2D< unsigned char > &  postScanImage,
const std::string &  headerFileName,
const std::string &  imageExtension2D 
)
static

◆ write() [3/16]

void usImageIo::write ( const usImagePostScan3D< unsigned char > &  postScanImage,
const std::string &  headerFileName 
)
static

Write 3D post-scan ultrasound image and settings

Parameters
postScanImageImage to write.
headerFileNameThe header file name.

Definition at line 902 of file usImageIo.cpp.

References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().

◆ write() [4/16]

◆ write() [5/16]

static void usImageIo::write ( const usImagePreScan2D< double > &  preScanImage,
const std::string &  headerFileName 
)
static

◆ write() [6/16]

void usImageIo::write ( const usImagePreScan2D< double > &  preScan2DImage,
const std::string &  headerFileName,
const std::string &  imageExtension2D 
)
static

Write 2D double pre-scan ultrasound image.

Parameters
preScan2DImageThe pre-scan image to write.
headerFileNameThe header file name to write.
imageExtension2DThe 2D image extension.

Definition at line 696 of file usImageIo.cpp.

◆ write() [7/16]

void usImageIo::write ( const usImagePreScan2D< unsigned char > &  preScanImage,
const std::string &  headerFileName 
)
static

Write 2D unsigned char pre-scan ultrasound image.

Parameters
preScanImageThe pre-scan image to write.
headerFileNameThe header file name to write, with extension.

Definition at line 320 of file usImageIo.cpp.

References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().

◆ write() [8/16]

void usImageIo::write ( const usImagePreScan2D< unsigned char > &  preScanImage,
const std::string &  headerFileName,
const std::string &  imageExtension2D 
)
static

◆ write() [9/16]

static void usImageIo::write ( const usImagePreScan3D< double > &  preScanImage3D,
const std::string &  headerFileName 
)
static

◆ write() [10/16]

void usImageIo::write ( const usImagePreScan3D< double > &  preScan3DImage,
const std::string &  headerFileName,
const std::string &  imageExtension2D 
)
static

Write 3D double pre-scan ultrasound image.

Parameters
preScan3DImageThe pre-scan image to write.
headerFileNameThe header file name to write.
imageExtension2DThe 2D image extension.

Definition at line 723 of file usImageIo.cpp.

◆ write() [11/16]

void usImageIo::write ( const usImagePreScan3D< unsigned char > &  preScanImage,
const std::string &  headerFileName 
)
static

Write 3D unsigned char pre-scan ultrasound image.

Parameters
preScanImageThe pre-scan image to write.
headerFileNameThe header file name to write.

Definition at line 475 of file usImageIo.cpp.

References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().

◆ write() [12/16]

void usImageIo::write ( const usImagePreScan3D< unsigned char > &  preScanImage,
const std::string &  headerFileName,
const std::string &  imageExtension2D 
)
static

◆ write() [13/16]

void usImageIo::write ( const usImageRF2D< short > &  imageRf2D,
const std::string &  headerFileName 
)
static

Write 2D rf ultrasound image.

Parameters
imageRf2DThe RF image to write.
headerFileNameThe header file name to write.

Definition at line 87 of file usImageIo.cpp.

References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().

◆ write() [14/16]

◆ write() [15/16]

void usImageIo::write ( const usImageRF3D< short > &  imageRf3D,
const std::string &  headerFileName 
)
static

Write 3D rf ultrasound image.

Parameters
imageRf3DThe RF image to write.
headerFileNameThe header file name to write.

Definition at line 200 of file usImageIo.cpp.

References FORMAT_MHD, FORMAT_XML, getHeaderFormat(), and write().

◆ write() [16/16]

void usImageIo::write ( const usImageRF3D< short > &  imageRf3D,
const std::string &  headerFileName,
const std::string &  imageExtension3D 
)
static