CustusX
2023.01.05-dev+develop.0da12
An IGT application
|
Helper class encapsulating a 2S US data set. More...
#include <cxUSFrameData.h>
Public Member Functions | |
~USFrameData () | |
Eigen::Array3i | getDimensions () const |
Vector3D | getSpacing () const |
QString | getName () const |
cx::ImageDataContainerPtr | getImageContainer () |
unsigned | getNumImages () |
void | resetRemovedFrames () |
void | removeFrame (unsigned int index) |
void | setCropBox (IntBoundingBox3D mCropbox) |
void | fillImageImport (vtkImageImportPtr import, int index) |
fill import with a single frame More... | |
void | setPurgeInputDataAfterInitialize (bool value) |
std::vector< std::vector< vtkImageDataPtr > > | initializeFrames (std::vector< bool > angio) |
virtual USFrameDataPtr | copy () |
void | purgeAll () |
bool | is4D () |
bool | is8bit () const |
Static Public Member Functions | |
static USFrameDataPtr | create (ImagePtr inputFrameData) |
static USFrameDataPtr | create (QString inputFilename, FileManagerServicePtr fileManager) |
static USFrameDataPtr | create (QString name, cx::ImageDataContainerPtr images) |
static USFrameDataPtr | create (QString name, std::vector< vtkImageDataPtr > frames) |
Protected Member Functions | |
USFrameData () | |
vtkImageDataPtr | useAngio (vtkImageDataPtr inData, vtkImageDataPtr grayFrame, int frameNum) const |
vtkImageDataPtr | cropImageExtent (vtkImageDataPtr input, IntBoundingBox3D cropbox) const |
Use only US angio data as input. Removes grayscale from the US data and converts the remaining color to grayscale. More... | |
vtkImageDataPtr | to8bitGrayscaleAndEffectuateCropping (vtkImageDataPtr input) const |
Protected Attributes | |
std::vector< int > | mReducedToFull |
map from indexes in the reduced volume to the full (original) volume. More... | |
IntBoundingBox3D | mCropbox |
QString | mName |
cx::ImageDataContainerPtr | mImageContainer |
bool | mPurgeInput |
Helper class encapsulating a 2S US data set.
The class is a thin wrapper around a Image , with the added possibility to remove single frames. (The Image is defined as consisting of a sequence of frames).
Note on thread safety: This class is NOT thread-safe in general, because VTK is not thread-safe (ref-counting is not mutexed).
However, if the object is properly initialized from one thread (meaning generateCache() has been called), then the const methods can be called.
Definition at line 87 of file cxUSFrameData.h.
cx::USFrameData::~USFrameData | ( | ) |
Definition at line 195 of file cxUSFrameData.cpp.
|
protected |
Definition at line 180 of file cxUSFrameData.cpp.
|
virtual |
Definition at line 475 of file cxUSFrameData.cpp.
|
static |
Definition at line 117 of file cxUSFrameData.cpp.
|
static |
Create object from file. If file or file+.mhd exists, use this, Otherwise assume input is split over several files and try to load all mhdFile + i + ".mhd". forall i.
Definition at line 134 of file cxUSFrameData.cpp.
|
static |
Definition at line 160 of file cxUSFrameData.cpp.
|
static |
Definition at line 172 of file cxUSFrameData.cpp.
|
protected |
Use only US angio data as input. Removes grayscale from the US data and converts the remaining color to grayscale.
Crop the image by setting the wholeExtent.
WARNING: This means that the dimension differ from the extent - this is a speed optimization during preprocessing. Using ClipDataOn would create a copy with dim==extent
Definition at line 256 of file cxUSFrameData.cpp.
void cx::USFrameData::fillImageImport | ( | vtkImageImportPtr | import, |
int | index | ||
) |
fill import with a single frame
Definition at line 492 of file cxUSFrameData.cpp.
Eigen::Array3i cx::USFrameData::getDimensions | ( | ) | const |
Definition at line 209 of file cxUSFrameData.cpp.
|
inline |
Definition at line 99 of file cxUSFrameData.h.
QString cx::USFrameData::getName | ( | ) | const |
Definition at line 482 of file cxUSFrameData.cpp.
unsigned cx::USFrameData::getNumImages | ( | ) |
Definition at line 487 of file cxUSFrameData.cpp.
Vector3D cx::USFrameData::getSpacing | ( | ) | const |
Definition at line 233 of file cxUSFrameData.cpp.
std::vector< std::vector< vtkImageDataPtr > > cx::USFrameData::initializeFrames | ( | std::vector< bool > | angio | ) |
Use the input raw data and control parameters to generate filtered frames. The input angio controls how many output objects that will be created, and if each of them should be angio or grayscale.
Definition at line 424 of file cxUSFrameData.cpp.
bool cx::USFrameData::is4D | ( | ) |
Definition at line 514 of file cxUSFrameData.cpp.
bool cx::USFrameData::is8bit | ( | ) | const |
Definition at line 530 of file cxUSFrameData.cpp.
void cx::USFrameData::purgeAll | ( | ) |
Definition at line 470 of file cxUSFrameData.cpp.
void cx::USFrameData::removeFrame | ( | unsigned int | index | ) |
Dimensions will be changed after this
Definition at line 203 of file cxUSFrameData.cpp.
void cx::USFrameData::resetRemovedFrames | ( | ) |
Definition at line 185 of file cxUSFrameData.cpp.
void cx::USFrameData::setCropBox | ( | IntBoundingBox3D | mCropbox | ) |
Definition at line 242 of file cxUSFrameData.cpp.
void cx::USFrameData::setPurgeInputDataAfterInitialize | ( | bool | value | ) |
Definition at line 419 of file cxUSFrameData.cpp.
|
protected |
Convert input to grayscale, and return a COPY of that volume ( in order to break the pipeline for memory purposes) ALSO: remove data in image outside extent - required by reconstruction. Convert to 8 bit as current US reconstruction algorithms only handles 8 bit
Definition at line 273 of file cxUSFrameData.cpp.
|
protected |
Definition at line 339 of file cxUSFrameData.cpp.
|
protected |
Definition at line 128 of file cxUSFrameData.h.
|
protected |
Definition at line 131 of file cxUSFrameData.h.
|
protected |
Definition at line 130 of file cxUSFrameData.h.
|
protected |
Definition at line 132 of file cxUSFrameData.h.
|
protected |
map from indexes in the reduced volume to the full (original) volume.
Definition at line 127 of file cxUSFrameData.h.