CustusX  2020.11.07-dev+develop.4ce4a
An IGT application
cx::USFrameData Class Reference

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

Detailed Description

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.

August 17, 2010
Nov 06, 2012
Ole Vegard Solberg

Definition at line 87 of file cxUSFrameData.h.

Constructor & Destructor Documentation

cx::USFrameData::~USFrameData ( )

Definition at line 195 of file cxUSFrameData.cpp.

cx::USFrameData::USFrameData ( )

Definition at line 180 of file cxUSFrameData.cpp.

Member Function Documentation

USFrameDataPtr cx::USFrameData::copy ( )

Definition at line 473 of file cxUSFrameData.cpp.

USFrameDataPtr cx::USFrameData::create ( ImagePtr  inputFrameData)


Definition at line 117 of file cxUSFrameData.cpp.

USFrameDataPtr cx::USFrameData::create ( QString  inputFilename,
FileManagerServicePtr  fileManager 

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.

USFrameDataPtr cx::USFrameData::create ( QString  name,
cx::ImageDataContainerPtr  images 

Definition at line 160 of file cxUSFrameData.cpp.

USFrameDataPtr cx::USFrameData::create ( QString  name,
std::vector< vtkImageDataPtr frames 

Definition at line 172 of file cxUSFrameData.cpp.

vtkImageDataPtr cx::USFrameData::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.

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 254 of file cxUSFrameData.cpp.

void cx::USFrameData::fillImageImport ( vtkImageImportPtr  import,
int  index 

fill import with a single frame

Definition at line 490 of file cxUSFrameData.cpp.

Eigen::Array3i cx::USFrameData::getDimensions ( ) const

Definition at line 209 of file cxUSFrameData.cpp.

cx::ImageDataContainerPtr cx::USFrameData::getImageContainer ( )

Definition at line 99 of file cxUSFrameData.h.

QString cx::USFrameData::getName ( ) const

Definition at line 480 of file cxUSFrameData.cpp.

unsigned cx::USFrameData::getNumImages ( )

Definition at line 485 of file cxUSFrameData.cpp.

Vector3D cx::USFrameData::getSpacing ( ) const

Definition at line 231 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 422 of file cxUSFrameData.cpp.

bool cx::USFrameData::is4D ( )

Definition at line 512 of file cxUSFrameData.cpp.

bool cx::USFrameData::is8bit ( ) const

Definition at line 528 of file cxUSFrameData.cpp.

void cx::USFrameData::purgeAll ( )

Definition at line 468 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 240 of file cxUSFrameData.cpp.

void cx::USFrameData::setPurgeInputDataAfterInitialize ( bool  value)

Definition at line 417 of file cxUSFrameData.cpp.

vtkImageDataPtr cx::USFrameData::to8bitGrayscaleAndEffectuateCropping ( vtkImageDataPtr  input) const

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 271 of file cxUSFrameData.cpp.

vtkImageDataPtr cx::USFrameData::useAngio ( vtkImageDataPtr  inData,
vtkImageDataPtr  grayFrame,
int  frameNum 
) const

Definition at line 337 of file cxUSFrameData.cpp.

Member Data Documentation

IntBoundingBox3D cx::USFrameData::mCropbox

Definition at line 128 of file cxUSFrameData.h.

cx::ImageDataContainerPtr cx::USFrameData::mImageContainer

Definition at line 131 of file cxUSFrameData.h.

QString cx::USFrameData::mName

Definition at line 130 of file cxUSFrameData.h.

bool cx::USFrameData::mPurgeInput

Definition at line 132 of file cxUSFrameData.h.

std::vector<int> cx::USFrameData::mReducedToFull

map from indexes in the reduced volume to the full (original) volume.

Definition at line 127 of file cxUSFrameData.h.

The documentation for this class was generated from the following files: