Fraxinus
16.5.0-fx-rc9
An IGT application
|
Reader class for the US Acquisition files. More...
#include <cxUsReconstructionFileReader.h>
Public Member Functions | |
UsReconstructionFileReader () | |
USReconstructInputData | readAllFiles (QString fileName, QString calFilesPath="") |
std::vector< TimedPosition > | readFrameTimestamps (QString fileName) |
Static Public Member Functions | |
static std::pair< QString, ProbeDefinition > | readProbeDefinitionFromFile (QString mhdFileName) |
Reader class for the US Acquisition files.
All files describing one acquisition lie the same folder. The files all have the name format US-Acq_<index>_<TS><stream>.<type>", where
Together, the files contains information about the us images and their timestamps, the tracking positions and their timestamps, and the probe calibration.
In the following, we use <filebase> = US-Acq_<index>_<TS><stream>.
Used prior to version cx3.4.0. A file in the metaheader file format containing the uncompressed image data. the z-direction is the time axis, i.e. the z dim is the number of us frames. See http://www.itk.org/Wiki/MetaIO/Documentation for more.
Two extra tags are added:
ConfigurationID = <path:inside:ProbeCalibConfigs.xml> ProbeCalibration = <not used>
The ConfigurationID refers to a specific configuration within ProbeCalibConfigs.xml, using colon separators.
A sequence of files in the metaheader file format containing the image data, one file for each frame. The frame index is given by the index in the file name. See http://www.itk.org/Wiki/MetaIO/Documentation for more. Replaces ref us_acq_file_format_mhd .
This file contains the probe definition, and is copied from the config/tool/Tools folder.
This file contains the probe definition. Replaces ref us_acq_file_format_file_xml .
This file contains the frame timestamps. This is a sequence of newline-separated floating-point numbers in milliceconds. The starting point is irrelevant. The number of timestamps must equal the number of us frames.
This file contains the tracking positions. This is a newline-separated sequence of matrices, one for each tracking sample. Each matrix is the prMt, i.e. the transform from tool to patient reference (See Coordinate Systems ). The last line of the matrix (always containing 0 0 0 1) is omitted. The matrix numbers is whitespace-separated with newline between rows. Thus the number of lines in this file is (# tracking positions) x 3.
This file contains the tracking timestamps. The format equals <filebase>.fts , but the number of timestamps equals the number of tracking positions.
This file contains the frame positions. This is a newline-separated sequence of matrices, one for each US frame. Each matrix is the rMu, i.e. the transform from lower-left centered image space to global reference (See Coordinate Systems and ProbeDefinition). The last line of the matrix (always containing 0 0 0 1) is omitted. The matrix numbers is whitespace-separated with newline between rows. Thus the number of lines in this file is (# tracking positions) x 3.
This file contains the image mask. The binary image shows what parts of the frame images contain valid US data. This file is only written, not read. It can be constructed from the probe data.
Definition at line 147 of file cxUsReconstructionFileReader.h.
cx::UsReconstructionFileReader::UsReconstructionFileReader | ( | ) |
Definition at line 50 of file cxUsReconstructionFileReader.cpp.
USReconstructInputData cx::UsReconstructionFileReader::readAllFiles | ( | QString | fileName, |
QString | calFilesPath = "" |
||
) |
Read all data from the files and return as a FileData object.
NOTE: The mFrames var will not be initialized with transforms, they must be generated explicitly.
the mMask var is filled with data from ProbeDefinition, or from file if present.
Definition at line 55 of file cxUsReconstructionFileReader.cpp.
std::vector< TimedPosition > cx::UsReconstructionFileReader::readFrameTimestamps | ( | QString | fileName | ) |
Definition at line 250 of file cxUsReconstructionFileReader.cpp.
|
static |
Read probe data from the probedata config file attached to the mhd file, named <mhdfilename-base>.probedata.xml
Definition at line 226 of file cxUsReconstructionFileReader.cpp.