![]() |
CustusX
15.4.0-beta
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 () |
Static Public Member Functions | |
static USFrameDataPtr | create (ImagePtr inputFrameData) |
static USFrameDataPtr | create (QString inputFilename) |
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) 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 | toGrayscaleAndEffectuateCropping (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 108 of file cxUSFrameData.h.
cx::USFrameData::~USFrameData | ( | ) |
Definition at line 215 of file cxUSFrameData.cpp.
|
protected |
Definition at line 200 of file cxUSFrameData.cpp.
|
virtual |
Definition at line 476 of file cxUSFrameData.cpp.
|
static |
Definition at line 137 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 154 of file cxUSFrameData.cpp.
|
static |
Definition at line 180 of file cxUSFrameData.cpp.
|
static |
Definition at line 192 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 273 of file cxUSFrameData.cpp.
void cx::USFrameData::fillImageImport | ( | vtkImageImportPtr | import, |
int | index | ||
) |
fill import with a single frame
Definition at line 493 of file cxUSFrameData.cpp.
Eigen::Array3i cx::USFrameData::getDimensions | ( | ) | const |
Definition at line 229 of file cxUSFrameData.cpp.
|
inline |
Definition at line 120 of file cxUSFrameData.h.
QString cx::USFrameData::getName | ( | ) | const |
Definition at line 483 of file cxUSFrameData.cpp.
unsigned cx::USFrameData::getNumImages | ( | ) |
Definition at line 488 of file cxUSFrameData.cpp.
Vector3D cx::USFrameData::getSpacing | ( | ) | const |
Definition at line 250 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 425 of file cxUSFrameData.cpp.
bool cx::USFrameData::is4D | ( | ) |
Definition at line 518 of file cxUSFrameData.cpp.
void cx::USFrameData::purgeAll | ( | ) |
Definition at line 471 of file cxUSFrameData.cpp.
void cx::USFrameData::removeFrame | ( | unsigned int | index | ) |
Dimensions will be changed after this
Definition at line 223 of file cxUSFrameData.cpp.
void cx::USFrameData::resetRemovedFrames | ( | ) |
Definition at line 205 of file cxUSFrameData.cpp.
void cx::USFrameData::setCropBox | ( | IntBoundingBox3D | mCropbox | ) |
Definition at line 259 of file cxUSFrameData.cpp.
void cx::USFrameData::setPurgeInputDataAfterInitialize | ( | bool | value | ) |
Definition at line 420 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.
Definition at line 289 of file cxUSFrameData.cpp.
|
protected |
Definition at line 341 of file cxUSFrameData.cpp.
|
protected |
Definition at line 148 of file cxUSFrameData.h.
|
protected |
Definition at line 151 of file cxUSFrameData.h.
|
protected |
Definition at line 150 of file cxUSFrameData.h.
|
protected |
Definition at line 152 of file cxUSFrameData.h.
|
protected |
map from indexes in the reduced volume to the full (original) volume.
Definition at line 147 of file cxUSFrameData.h.