NorMIT-nav  22.09
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.

Date
August 17, 2010
Nov 06, 2012
Author
Ole Vegard Solberg
christiana

Definition at line 87 of file cxUSFrameData.h.

Constructor & Destructor Documentation

◆ ~USFrameData()

cx::USFrameData::~USFrameData ( )

Definition at line 195 of file cxUSFrameData.cpp.

◆ USFrameData()

cx::USFrameData::USFrameData ( )
protected

Definition at line 180 of file cxUSFrameData.cpp.

Member Function Documentation

◆ copy()

USFrameDataPtr cx::USFrameData::copy ( )
virtual

Definition at line 475 of file cxUSFrameData.cpp.

◆ create() [1/4]

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

-------------------------------------------------------------------------—


Definition at line 117 of file cxUSFrameData.cpp.

◆ create() [2/4]

USFrameDataPtr cx::USFrameData::create ( QString  inputFilename,
FileManagerServicePtr  fileManager 
)
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.

◆ create() [3/4]

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

Definition at line 160 of file cxUSFrameData.cpp.

◆ create() [4/4]

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

Definition at line 172 of file cxUSFrameData.cpp.

◆ cropImageExtent()

vtkImageDataPtr cx::USFrameData::cropImageExtent ( vtkImageDataPtr  input,
IntBoundingBox3D  cropbox 
) const
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.

◆ fillImageImport()

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

fill import with a single frame

Definition at line 492 of file cxUSFrameData.cpp.

◆ getDimensions()

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

Definition at line 209 of file cxUSFrameData.cpp.

◆ getImageContainer()

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

Definition at line 99 of file cxUSFrameData.h.

◆ getName()

QString cx::USFrameData::getName ( ) const

Definition at line 482 of file cxUSFrameData.cpp.

◆ getNumImages()

unsigned cx::USFrameData::getNumImages ( )

Definition at line 487 of file cxUSFrameData.cpp.

◆ getSpacing()

Vector3D cx::USFrameData::getSpacing ( ) const

Definition at line 233 of file cxUSFrameData.cpp.

◆ initializeFrames()

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.

◆ is4D()

bool cx::USFrameData::is4D ( )

Definition at line 514 of file cxUSFrameData.cpp.

◆ is8bit()

bool cx::USFrameData::is8bit ( ) const

Definition at line 530 of file cxUSFrameData.cpp.

◆ purgeAll()

void cx::USFrameData::purgeAll ( )

Definition at line 470 of file cxUSFrameData.cpp.

◆ removeFrame()

void cx::USFrameData::removeFrame ( unsigned int  index)

Dimensions will be changed after this

Definition at line 203 of file cxUSFrameData.cpp.

◆ resetRemovedFrames()

void cx::USFrameData::resetRemovedFrames ( )

Definition at line 185 of file cxUSFrameData.cpp.

◆ setCropBox()

void cx::USFrameData::setCropBox ( IntBoundingBox3D  mCropbox)

Definition at line 242 of file cxUSFrameData.cpp.

◆ setPurgeInputDataAfterInitialize()

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

Definition at line 419 of file cxUSFrameData.cpp.

◆ to8bitGrayscaleAndEffectuateCropping()

vtkImageDataPtr cx::USFrameData::to8bitGrayscaleAndEffectuateCropping ( vtkImageDataPtr  input) const
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.

◆ useAngio()

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

Definition at line 339 of file cxUSFrameData.cpp.

Member Data Documentation

◆ mCropbox

IntBoundingBox3D cx::USFrameData::mCropbox
protected

Definition at line 128 of file cxUSFrameData.h.

◆ mImageContainer

cx::ImageDataContainerPtr cx::USFrameData::mImageContainer
protected

Definition at line 131 of file cxUSFrameData.h.

◆ mName

QString cx::USFrameData::mName
protected

Definition at line 130 of file cxUSFrameData.h.

◆ mPurgeInput

bool cx::USFrameData::mPurgeInput
protected

Definition at line 132 of file cxUSFrameData.h.

◆ mReducedToFull

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

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: