CustusX
16.5.0-rc9
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) |
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 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 492 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 509 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 499 of file cxUSFrameData.cpp.
unsigned cx::USFrameData::getNumImages | ( | ) |
Definition at line 504 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 441 of file cxUSFrameData.cpp.
bool cx::USFrameData::is4D | ( | ) |
Definition at line 531 of file cxUSFrameData.cpp.
bool cx::USFrameData::is8bit | ( | ) | const |
Definition at line 541 of file cxUSFrameData.cpp.
void cx::USFrameData::purgeAll | ( | ) |
Definition at line 487 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 436 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 290 of file cxUSFrameData.cpp.
|
protected |
Definition at line 356 of file cxUSFrameData.cpp.
|
protected |
Definition at line 149 of file cxUSFrameData.h.
|
protected |
Definition at line 152 of file cxUSFrameData.h.
|
protected |
Definition at line 151 of file cxUSFrameData.h.
|
protected |
Definition at line 153 of file cxUSFrameData.h.
|
protected |
map from indexes in the reduced volume to the full (original) volume.
Definition at line 148 of file cxUSFrameData.h.