PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPlusCenterOfRotationCalibAlgo Class Reference

Algorithm for computing the center of in-plane rotation of ultrasound images of a calibration phantom. More...

#include <src/PlusCalibration/vtkCenterOfRotationCalibAlgo/vtkPlusCenterOfRotationCalibAlgo.h>

Inheritance diagram for vtkPlusCenterOfRotationCalibAlgo:
Inheritance graph
[legend]
Collaboration diagram for vtkPlusCenterOfRotationCalibAlgo:
Collaboration graph
[legend]

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual PlusStatus GenerateReport (vtkPlusHTMLGenerator *htmlReport)
 
virtual PlusStatus GetCenterOfRotationPx (double centerOfRotationPx[2])
 
virtual const char * GetClassName ()
 
virtual PlusStatus GetError (double &mean, double &stdev)
 
virtual vtkTable * GetReportTable ()
 
virtual int IsA (const char *type)
 
virtual void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
virtual void SetInputs (vtkIGSIOTrackedFrameList *trackedFrameList, std::vector< int > &indices, double spacing[2])
 

Static Public Member Functions

static PlusStatus GenerateCenterOfRotationReport (int numberOfNWirePatterns, vtkPlusHTMLGenerator *htmlReport, vtkTable *reportTable, double centerOfRotationPx[2])
 
static int IsTypeOf (const char *type)
 
static vtkPlusCenterOfRotationCalibAlgoNew ()
 
static vtkPlusCenterOfRotationCalibAlgoSafeDownCast (vtkObject *o)
 

Protected Member Functions

PlusStatus AddNewColumnToReportTable (const char *columnName)
 
virtual PlusStatus ConstructLinearEquationForCalibration (std::vector< vnl_vector< double > > &aMatrix, std::vector< double > &bVector)
 
int GetNumberOfNWirePatterns ()
 
virtual void SetCenterOfRotationPx (int, int)
 
void SetCenterOfRotationPx (int [2])
 
virtual void SetReportTable (vtkTable *)
 
virtual void SetSpacing (double, double)
 
void SetSpacing (double [2])
 
virtual void SetTrackedFrameList (vtkIGSIOTrackedFrameList *)
 
virtual void SetTrackedFrameListIndices (std::vector< int > &indices)
 
virtual PlusStatus Update ()
 
virtual PlusStatus UpdateReportTable ()
 
 vtkPlusCenterOfRotationCalibAlgo ()
 
virtual ~vtkPlusCenterOfRotationCalibAlgo ()
 

Protected Attributes

double CenterOfRotationPx [2]
 
double ErrorMean
 
double ErrorStdev
 
vtkTable * ReportTable
 
double Spacing [2]
 
vtkIGSIOTrackedFrameList * TrackedFrameList
 
std::vector< intTrackedFrameListIndices
 
vtkTimeStamp UpdateTime
 

Detailed Description

Algorithm for computing the center of in-plane rotation of ultrasound images of a calibration phantom.

The algorithm is used for computing the rotation axis position of brachytherapy steppers. The rotation is assumed to be in the image plane (the rotation axis is assumed to be perpendicular to the image plane). The images shall be taken of a calibration phantom and the frames shall be segmented (the fiducial point coordinates shall be computed) before calling this algorithm.

Asumptions:
  Distance between a non-moving wire position (denoted as S) and the rotation center
  of the optical encoder (denoted as O) remains constant during rotation:
      || Si - O || = || Sj - O ||

Model:
      pow(Sxi - Ox, 2) + pow(Syi - Oy, 2) = pow(Sxj - Ox, 2) + pow(Syj - Oy, 2) where i != j

Unknowns:
  Ox, Oy = center of rotation in pixel

Linear system:
  Ax = B

  [ (Sxi - Sxj) (Syi - Syj) ] * [ Ox ] = [ (0.5*( Sxi*Sxi + Syi*Syi - Sxj*Sxj - Syj*Syj )) ]
                                [ Oy ]

Definition at line 51 of file vtkPlusCenterOfRotationCalibAlgo.h.

Member Typedef Documentation

◆ Superclass

Definition at line 56 of file vtkPlusCenterOfRotationCalibAlgo.h.

Constructor & Destructor Documentation

◆ vtkPlusCenterOfRotationCalibAlgo()

vtkPlusCenterOfRotationCalibAlgo::vtkPlusCenterOfRotationCalibAlgo ( )
protected

Definition at line 27 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ ~vtkPlusCenterOfRotationCalibAlgo()

vtkPlusCenterOfRotationCalibAlgo::~vtkPlusCenterOfRotationCalibAlgo ( )
protectedvirtual

Definition at line 38 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

Member Function Documentation

◆ AddNewColumnToReportTable()

PlusStatus vtkPlusCenterOfRotationCalibAlgo::AddNewColumnToReportTable ( const char *  columnName)
protected

Add new column to the report table

Definition at line 506 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ ConstructLinearEquationForCalibration()

PlusStatus vtkPlusCenterOfRotationCalibAlgo::ConstructLinearEquationForCalibration ( std::vector< vnl_vector< double > > &  aMatrix,
std::vector< double > &  bVector 
)
protectedvirtual

Construct linear equation for center of rotation calibration

Definition at line 228 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ GenerateCenterOfRotationReport()

PlusStatus vtkPlusCenterOfRotationCalibAlgo::GenerateCenterOfRotationReport ( int  numberOfNWirePatterns,
vtkPlusHTMLGenerator htmlReport,
vtkTable *  reportTable,
double  centerOfRotationPx[2] 
)
static

Add generated html report from center of rotation calibration to the existing html report

Parameters
numberOfNWirePatternsNumber of N-wire structure used
htmlReportHas to be defined by the caller function
plotterHas to be defined by the caller function
reportTableComputed output
centerOfRotationPxComputed output

Definition at line 551 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ GenerateReport()

PlusStatus vtkPlusCenterOfRotationCalibAlgo::GenerateReport ( vtkPlusHTMLGenerator htmlReport)
virtual

Add generated html report from center of rotation calibration to the existing html report

Definition at line 535 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ GetCenterOfRotationPx()

PlusStatus vtkPlusCenterOfRotationCalibAlgo::GetCenterOfRotationPx ( double  centerOfRotationPx[2])
virtual

Get the computed center of rotation position in pixel

Definition at line 86 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ GetClassName()

virtual const char* vtkPlusCenterOfRotationCalibAlgo::GetClassName ( )
virtual

◆ GetError()

PlusStatus vtkPlusCenterOfRotationCalibAlgo::GetError ( double &  mean,
double &  stdev 
)
virtual

Get the center of rotation calibration error

Definition at line 99 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ GetNumberOfNWirePatterns()

int vtkPlusCenterOfRotationCalibAlgo::GetNumberOfNWirePatterns ( )
protected

Get the number of N-wire patterns used in the tracked frame list

Definition at line 172 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ GetReportTable()

virtual vtkTable* vtkPlusCenterOfRotationCalibAlgo::GetReportTable ( )
virtual

Get the report table that is used for storing algorithm results

◆ IsA()

virtual int vtkPlusCenterOfRotationCalibAlgo::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkPlusCenterOfRotationCalibAlgo::IsTypeOf ( const char *  type)
static

◆ New()

static vtkPlusCenterOfRotationCalibAlgo* vtkPlusCenterOfRotationCalibAlgo::New ( )
static

◆ PrintSelf()

void vtkPlusCenterOfRotationCalibAlgo::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Definition at line 45 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ SafeDownCast()

static vtkPlusCenterOfRotationCalibAlgo* vtkPlusCenterOfRotationCalibAlgo::SafeDownCast ( vtkObject *  o)
static

◆ SetCenterOfRotationPx() [1/2]

void vtkPlusCenterOfRotationCalibAlgo::SetCenterOfRotationPx ( int  [2])
protected

◆ SetCenterOfRotationPx() [2/2]

virtual void vtkPlusCenterOfRotationCalibAlgo::SetCenterOfRotationPx ( int  ,
int   
)
protectedvirtual

Set the rotation center in pixels.

◆ SetInputs()

void vtkPlusCenterOfRotationCalibAlgo::SetInputs ( vtkIGSIOTrackedFrameList *  trackedFrameList,
std::vector< int > &  indices,
double  spacing[2] 
)
virtual

Set all required algorithm inputs.

Parameters
trackedFrameListTracked frames with segmentation results
indicesTracked frame indices that the algoritm should use during calibration
spacingImage spacing (mm/pixel)

Definition at line 69 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ SetReportTable()

virtual void vtkPlusCenterOfRotationCalibAlgo::SetReportTable ( vtkTable *  )
protectedvirtual

Report table used for storing algorithm results

◆ SetSpacing() [1/2]

void vtkPlusCenterOfRotationCalibAlgo::SetSpacing ( double  [2])
protected

◆ SetSpacing() [2/2]

virtual void vtkPlusCenterOfRotationCalibAlgo::SetSpacing ( double  ,
double   
)
protectedvirtual

Set the input image spacing (mm/pixel)

◆ SetTrackedFrameList()

virtual void vtkPlusCenterOfRotationCalibAlgo::SetTrackedFrameList ( vtkIGSIOTrackedFrameList *  )
protectedvirtual

Set the input tracked frame list

◆ SetTrackedFrameListIndices()

void vtkPlusCenterOfRotationCalibAlgo::SetTrackedFrameListIndices ( std::vector< int > &  indices)
protectedvirtual

Set tracked frame indices used for calibration

Definition at line 78 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ Update()

PlusStatus vtkPlusCenterOfRotationCalibAlgo::Update ( )
protectedvirtual

Bring this algorithm's outputs up-to-date.

Definition at line 112 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

◆ UpdateReportTable()

PlusStatus vtkPlusCenterOfRotationCalibAlgo::UpdateReportTable ( )
protectedvirtual

Update center of rotation calibration error report table

Definition at line 348 of file vtkPlusCenterOfRotationCalibAlgo.cxx.

Member Data Documentation

◆ CenterOfRotationPx

double vtkPlusCenterOfRotationCalibAlgo::CenterOfRotationPx[2]
protected

Stores the center of rotation in px space

Definition at line 124 of file vtkPlusCenterOfRotationCalibAlgo.h.

◆ ErrorMean

double vtkPlusCenterOfRotationCalibAlgo::ErrorMean
protected

Calibration error mean

Definition at line 142 of file vtkPlusCenterOfRotationCalibAlgo.h.

◆ ErrorStdev

double vtkPlusCenterOfRotationCalibAlgo::ErrorStdev
protected

Calibration error standard deviation

Definition at line 145 of file vtkPlusCenterOfRotationCalibAlgo.h.

◆ ReportTable

vtkTable* vtkPlusCenterOfRotationCalibAlgo::ReportTable
protected

Table used for storing algorithm results

Definition at line 139 of file vtkPlusCenterOfRotationCalibAlgo.h.

◆ Spacing

double vtkPlusCenterOfRotationCalibAlgo::Spacing[2]
protected

Image spacing (mm/pixel)

Definition at line 130 of file vtkPlusCenterOfRotationCalibAlgo.h.

◆ TrackedFrameList

vtkIGSIOTrackedFrameList* vtkPlusCenterOfRotationCalibAlgo::TrackedFrameList
protected

Tracked frames used for calibration with segmentation results

Definition at line 133 of file vtkPlusCenterOfRotationCalibAlgo.h.

◆ TrackedFrameListIndices

std::vector<int> vtkPlusCenterOfRotationCalibAlgo::TrackedFrameListIndices
protected

Tracked frame indices used for calibration

Definition at line 136 of file vtkPlusCenterOfRotationCalibAlgo.h.

◆ UpdateTime

vtkTimeStamp vtkPlusCenterOfRotationCalibAlgo::UpdateTime
protected

When the results were computed. The result is recomputed only if the inputs changed more recently than UpdateTime.

Definition at line 148 of file vtkPlusCenterOfRotationCalibAlgo.h.


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