![]() |
CustusX
15.4.0-beta
An IGT application
|
#include <SeansVesselReg.hxx>
Classes | |
struct | Context |
Public Types | |
typedef boost::shared_ptr < Context > | ContextPtr |
Public Member Functions | |
SeansVesselReg () | |
~SeansVesselReg () | |
bool | execute (DataPtr source, DataPtr target, QString logPath) |
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) |
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) |
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 |
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) |
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... | |
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()
Original authors: Ingerid Reinertsen - algorithm. Sean (get full name) - refactored code.
Definition at line 30 of file SeansVesselReg.hxx.
typedef boost::shared_ptr<Context> cx::SeansVesselReg::ContextPtr |
Definition at line 59 of file SeansVesselReg.hxx.
cx::SeansVesselReg::SeansVesselReg | ( | ) |
Definition at line 38 of file SeansVesselReg.cxx.
cx::SeansVesselReg::~SeansVesselReg | ( | ) |
Definition at line 53 of file SeansVesselReg.cxx.
void cx::SeansVesselReg::checkQuality | ( | Transform3D | linearTransform | ) |
Analyze 'size' of transform. Warn if too far away from an identity matrix.
Definition at line 921 of file SeansVesselReg.cxx.
void cx::SeansVesselReg::computeDistances | ( | ContextPtr | context | ) |
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 281 of file SeansVesselReg.cxx.
|
static |
Definition at line 506 of file SeansVesselReg.cxx.
|
protected |
Definition at line 463 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 212 of file SeansVesselReg.cxx.
|
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 379 of file SeansVesselReg.cxx.
|
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 542 of file SeansVesselReg.cxx.
Execute the vessel to vessel registration. The result is available via the getLinearResult().
source is moving and target is fixed
Definition at line 62 of file SeansVesselReg.cxx.
|
static |
Extract polydata from a image.
image | |
p_neighborhoodFilterThreshold | |
p_BoundingBox |
Not used and probably buggyInput an image representation of centerlines. Transform to polydata, reject all data outside bounding box, unknown parameter: p_neighborhoodFilterThreshold
Definition at line 780 of file SeansVesselReg.cxx.
Transform3D cx::SeansVesselReg::getLinearResult | ( | ContextPtr | context = ContextPtr() | ) |
Definition at line 579 of file SeansVesselReg.cxx.
Transform3D cx::SeansVesselReg::getNonLinearTransform | ( | ) |
double cx::SeansVesselReg::getResultLtsRatio | ( | ContextPtr | context = ContextPtr() | ) |
Definition at line 598 of file SeansVesselReg.cxx.
double cx::SeansVesselReg::getResultMetric | ( | ContextPtr | context = ContextPtr() | ) |
Definition at line 591 of file SeansVesselReg.cxx.
|
protected |
iteratetively register linearly on the input context until it converges.
Definition at line 158 of file SeansVesselReg.cxx.
|
protected |
Search along several LTS for the best solution. Return the completed (linear) registration with the lowest metric.
Definition at line 115 of file SeansVesselReg.cxx.
|
protected |
Definition at line 419 of file SeansVesselReg.cxx.
|
protected |
Definition at line 434 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 345 of file SeansVesselReg.cxx.
|
protected |
Definition at line 524 of file SeansVesselReg.cxx.
|
protected |
Definition at line 533 of file SeansVesselReg.cxx.
|
protected |
Definition at line 627 of file SeansVesselReg.cxx.
|
protected |
|
inline |
Definition at line 73 of file SeansVesselReg.hxx.
|
protected |
Create a copy of context that can be used to start a new iteration.
Definition at line 186 of file SeansVesselReg.cxx.
|
protected |
Transform input using the transform
Definition at line 399 of file SeansVesselReg.cxx.
|
protected |
result from last run of execute()
Definition at line 128 of file SeansVesselReg.hxx.
bool cx::SeansVesselReg::mt_auto_lts |
Definition at line 78 of file SeansVesselReg.hxx.
double cx::SeansVesselReg::mt_distanceDeltaStopThreshold |
Definition at line 80 of file SeansVesselReg.hxx.
bool cx::SeansVesselReg::mt_doOnlyLinear |
Definition at line 83 of file SeansVesselReg.hxx.
double cx::SeansVesselReg::mt_lambda |
Definition at line 81 of file SeansVesselReg.hxx.
int cx::SeansVesselReg::mt_ltsRatio |
Definition at line 79 of file SeansVesselReg.hxx.
double cx::SeansVesselReg::mt_maximumDurationSeconds |
Definition at line 89 of file SeansVesselReg.hxx.
int cx::SeansVesselReg::mt_maximumNumberOfIterations |
Definition at line 87 of file SeansVesselReg.hxx.
int cx::SeansVesselReg::mt_sampleRatio |
Definition at line 85 of file SeansVesselReg.hxx.
double cx::SeansVesselReg::mt_sigma |
Definition at line 82 of file SeansVesselReg.hxx.
int cx::SeansVesselReg::mt_singlePointThreshold |
Definition at line 86 of file SeansVesselReg.hxx.
bool cx::SeansVesselReg::mt_verbose |
Definition at line 88 of file SeansVesselReg.hxx.