NorMIT-nav  16.5
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::SeansVesselReg Class Reference

#include <SeansVesselReg.hxx>

Classes

struct  Context
 

Public Types

typedef boost::shared_ptr
< Context
ContextPtr
 

Public Member Functions

 SeansVesselReg ()
 
 ~SeansVesselReg ()
 
bool initialize (DataPtr source, DataPtr target, QString logPath)
 
bool isValid () const
 
bool execute ()
 
bool performOneRegistration ()
 
Transform3D getLinearResult (ContextPtr context=ContextPtr())
 
double getResultMetric (ContextPtr context=ContextPtr())
 
double getResultLtsRatio (ContextPtr context=ContextPtr())
 
Transform3D getNonLinearTransform ()
 
void checkQuality (Transform3D linearTransform)
 
void setDebugOutput (bool on)
 
vtkPolyDataPtr getDifferenceLines ()
 Lines connecting the moving and fixed data, according to LTS. More...
 
void notifyPreRegistrationWarnings ()
 
ContextPtr createContext (DataPtr source, DataPtr target)
 
void performOneRegistration (ContextPtr context, bool linear)
 Register the source points to the target point in a single ste. More...
 
void computeDistances (ContextPtr context=ContextPtr())
 Compute distances between the two datasets. More...
 

Static Public Member Functions

static vtkPolyDataPtr convertToPolyData (vtkPointsPtr input)
 
static vtkPolyDataPtr extractPolyData (ImagePtr image, int p_neighborhoodFilterThreshold, double p_BoundingBox[6])
 

Public Attributes

bool mt_auto_lts
 
int mt_ltsRatio
 
double mt_distanceDeltaStopThreshold
 
double mt_lambda
 
double mt_sigma
 
bool mt_doOnlyLinear
 
int mt_sampleRatio
 
int mt_singlePointThreshold
 
int mt_maximumNumberOfIterations
 
bool mt_verbose
 
double mt_maximumDurationSeconds
 
double margin
 
QString m_logPath
 

Protected Member Functions

bool runAlgorithm (ContextPtr context, vtkGeneralTransformPtr myConcatenation, int largeSteps, double fraction)
 
void printOutResults (QString fileNamePrefix, vtkGeneralTransformPtr myConcatenation)
 
vtkAbstractTransformPtr linearRegistration (vtkPointsPtr sortedSourcePoints, vtkPointsPtr sortedTargetPoints)
 
vtkAbstractTransformPtr nonLinearRegistration (vtkPointsPtr sortedSourcePoints, vtkPointsPtr sortedTargetPoints)
 
vtkPolyDataPtr convertToPolyData (DataPtr data, QString id)
 
vtkPointsPtr transformPoints (vtkPointsPtr input, vtkAbstractTransformPtr transform)
 
vtkPointsPtr createSortedPoints (vtkIdListPtr sortedIDList, vtkPointsPtr unsortedPoints, int numPoints)
 
vtkPolyDataPtr crop (vtkPolyDataPtr input, vtkPolyDataPtr fixed, double margin)
 
ContextPtr linearRefineAllLTS (ContextPtr context)
 
void linearRefine (ContextPtr context)
 
SeansVesselReg::ContextPtr splitContext (ContextPtr context)
 
void print (vtkPointsPtr points)
 
void print (vtkPolyDataPtr data)
 

Protected Attributes

ContextPtr mLastRun
 result from last run of execute() More...
 

Detailed Description

Vessel - vessel registration algorithm.

Input is two centerline representations of vessel trees. Output is either a linear transform or a nonlinear transform (nonlinear not used yet).

Basic usage: Run execute(), then get result with getLinearTransform()

Date
Feb 4, 2011
Author
Christian Askeland, SINTEF

Original authors: Ingerid Reinertsen - algorithm. Sean (get full name) - refactored code.

Definition at line 30 of file SeansVesselReg.hxx.

Member Typedef Documentation

typedef boost::shared_ptr<Context> cx::SeansVesselReg::ContextPtr

Definition at line 60 of file SeansVesselReg.hxx.

Constructor & Destructor Documentation

cx::SeansVesselReg::SeansVesselReg ( )

Definition at line 39 of file SeansVesselReg.cxx.

cx::SeansVesselReg::~SeansVesselReg ( )

Definition at line 55 of file SeansVesselReg.cxx.

Member Function Documentation

void cx::SeansVesselReg::checkQuality ( Transform3D  linearTransform)

Analyze 'size' of transform. Warn if too far away from an identity matrix.

Definition at line 954 of file SeansVesselReg.cxx.

void cx::SeansVesselReg::computeDistances ( ContextPtr  context = ContextPtr())

Compute distances between the two datasets.

The results will be added into the context: sorted source and target points, and the metric.

Definition at line 310 of file SeansVesselReg.cxx.

vtkPolyDataPtr cx::SeansVesselReg::convertToPolyData ( vtkPointsPtr  input)
static

Definition at line 581 of file SeansVesselReg.cxx.

vtkPolyDataPtr cx::SeansVesselReg::convertToPolyData ( DataPtr  data,
QString  id 
)
protected

Definition at line 501 of file SeansVesselReg.cxx.

SeansVesselReg::ContextPtr cx::SeansVesselReg::createContext ( DataPtr  source,
DataPtr  target 
)

Create a context containing data to use during iteration

< local copy of the lts ratio, can be changed for current iteration.

Definition at line 243 of file SeansVesselReg.cxx.

vtkPointsPtr cx::SeansVesselReg::createSortedPoints ( vtkIdListPtr  sortedIDList,
vtkPointsPtr  unsortedPoints,
int  numPoints 
)
protected

Using the already sorted list of point ID's, create a sorted list of points based on the numPoint first of unsortedPoints.

Definition at line 417 of file SeansVesselReg.cxx.

vtkPolyDataPtr cx::SeansVesselReg::crop ( vtkPolyDataPtr  input,
vtkPolyDataPtr  fixed,
double  margin 
)
protected

Crop the input data using a bounding box generated from the fixed data. The margin is used to enlarge the bounding box.

Definition at line 617 of file SeansVesselReg.cxx.

bool cx::SeansVesselReg::execute ( )

Execute the vessel to vessel registration. The result is available via the getLinearResult().

source is moving and target is fixed

Definition at line 82 of file SeansVesselReg.cxx.

vtkPolyDataPtr cx::SeansVesselReg::extractPolyData ( ImagePtr  image,
int  p_neighborhoodFilterThreshold,
double  p_BoundingBox[6] 
)
static

Extract polydata from a image.

Parameters
image
p_neighborhoodFilterThreshold
p_BoundingBox
Returns

Input an image representation of centerlines. Transform to polydata, reject all data outside bounding box, unknown parameter: p_neighborhoodFilterThreshold

Definition at line 813 of file SeansVesselReg.cxx.

vtkPolyDataPtr cx::SeansVesselReg::getDifferenceLines ( )

Lines connecting the moving and fixed data, according to LTS.

Definition at line 978 of file SeansVesselReg.cxx.

Transform3D cx::SeansVesselReg::getLinearResult ( ContextPtr  context = ContextPtr())

Definition at line 659 of file SeansVesselReg.cxx.

Transform3D cx::SeansVesselReg::getNonLinearTransform ( )
double cx::SeansVesselReg::getResultLtsRatio ( ContextPtr  context = ContextPtr())

Definition at line 680 of file SeansVesselReg.cxx.

double cx::SeansVesselReg::getResultMetric ( ContextPtr  context = ContextPtr())

Definition at line 671 of file SeansVesselReg.cxx.

bool cx::SeansVesselReg::initialize ( DataPtr  source,
DataPtr  target,
QString  logPath 
)

Execute the vessel to vessel registration. The result is available via the getLinearResult().

source is moving and target is fixed

Definition at line 64 of file SeansVesselReg.cxx.

bool cx::SeansVesselReg::isValid ( ) const

Definition at line 137 of file SeansVesselReg.cxx.

void cx::SeansVesselReg::linearRefine ( ContextPtr  context)
protected

iteratetively register linearly on the input context until it converges.

Definition at line 189 of file SeansVesselReg.cxx.

SeansVesselReg::ContextPtr cx::SeansVesselReg::linearRefineAllLTS ( ContextPtr  seed)
protected

Search along several LTS for the best solution. Return the completed (linear) registration with the lowest metric.

Definition at line 146 of file SeansVesselReg.cxx.

vtkAbstractTransformPtr cx::SeansVesselReg::linearRegistration ( vtkPointsPtr  sortedSourcePoints,
vtkPointsPtr  sortedTargetPoints 
)
protected

Definition at line 457 of file SeansVesselReg.cxx.

vtkAbstractTransformPtr cx::SeansVesselReg::nonLinearRegistration ( vtkPointsPtr  sortedSourcePoints,
vtkPointsPtr  sortedTargetPoints 
)
protected

Definition at line 472 of file SeansVesselReg.cxx.

void cx::SeansVesselReg::notifyPreRegistrationWarnings ( )

Definition at line 986 of file SeansVesselReg.cxx.

bool cx::SeansVesselReg::performOneRegistration ( )

Definition at line 127 of file SeansVesselReg.cxx.

void cx::SeansVesselReg::performOneRegistration ( ContextPtr  context,
bool  linear 
)

Register the source points to the target point in a single ste.

Use the source to find the closest points on the target set, then register using either a landmark transform or a thinplatetransform. The context source points will be updated with the new transformation.

If sorted points are available in the context, they are used instead of computing new ones. The sorted data will always be cleared at the end of this method, This is because we want to call it iteratively.

Definition at line 382 of file SeansVesselReg.cxx.

void cx::SeansVesselReg::print ( vtkPointsPtr  points)
protected

Definition at line 599 of file SeansVesselReg.cxx.

void cx::SeansVesselReg::print ( vtkPolyDataPtr  data)
protected

Definition at line 608 of file SeansVesselReg.cxx.

void cx::SeansVesselReg::printOutResults ( QString  fileNamePrefix,
vtkGeneralTransformPtr  myConcatenation 
)
protected

Definition at line 705 of file SeansVesselReg.cxx.

bool cx::SeansVesselReg::runAlgorithm ( ContextPtr  context,
vtkGeneralTransformPtr  myConcatenation,
int  largeSteps,
double  fraction 
)
protected
void cx::SeansVesselReg::setDebugOutput ( bool  on)
inline

Definition at line 76 of file SeansVesselReg.hxx.

SeansVesselReg::ContextPtr cx::SeansVesselReg::splitContext ( ContextPtr  context)
protected

Create a copy of context that can be used to start a new iteration.

Definition at line 217 of file SeansVesselReg.cxx.

vtkPointsPtr cx::SeansVesselReg::transformPoints ( vtkPointsPtr  input,
vtkAbstractTransformPtr  transform 
)
protected

Transform input using the transform

Definition at line 437 of file SeansVesselReg.cxx.

Member Data Documentation

QString cx::SeansVesselReg::m_logPath

Definition at line 97 of file SeansVesselReg.hxx.

double cx::SeansVesselReg::margin

Definition at line 96 of file SeansVesselReg.hxx.

ContextPtr cx::SeansVesselReg::mLastRun
protected

result from last run of execute()

Definition at line 136 of file SeansVesselReg.hxx.

bool cx::SeansVesselReg::mt_auto_lts

Definition at line 84 of file SeansVesselReg.hxx.

double cx::SeansVesselReg::mt_distanceDeltaStopThreshold

Definition at line 86 of file SeansVesselReg.hxx.

bool cx::SeansVesselReg::mt_doOnlyLinear

Definition at line 89 of file SeansVesselReg.hxx.

double cx::SeansVesselReg::mt_lambda

Definition at line 87 of file SeansVesselReg.hxx.

int cx::SeansVesselReg::mt_ltsRatio

Definition at line 85 of file SeansVesselReg.hxx.

double cx::SeansVesselReg::mt_maximumDurationSeconds

Definition at line 95 of file SeansVesselReg.hxx.

int cx::SeansVesselReg::mt_maximumNumberOfIterations

Definition at line 93 of file SeansVesselReg.hxx.

int cx::SeansVesselReg::mt_sampleRatio

Definition at line 91 of file SeansVesselReg.hxx.

double cx::SeansVesselReg::mt_sigma

Definition at line 88 of file SeansVesselReg.hxx.

int cx::SeansVesselReg::mt_singlePointThreshold

Definition at line 92 of file SeansVesselReg.hxx.

bool cx::SeansVesselReg::mt_verbose

Definition at line 94 of file SeansVesselReg.hxx.


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