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

Detect the position of a line (image of a plane) in an US image sequence. More...

#include <src/PlusCalibration/vtkLineSegmentationAlgo/vtkPlusLineSegmentationAlgo.h>

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

Classes

struct  LineParameters
 

Public Types

typedef itk::Image< CharPixelType, 2 > CharImageType
 
typedef unsigned char CharPixelType
 
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
void GetDetectedLineParameters (std::vector< LineParameters > &parameters)
 
void GetDetectedPositions (std::deque< double > &positions)
 
void GetDetectedTimestamps (std::deque< double > &timestamps)
 
virtual bool GetPlotIntensityProfile ()
 
virtual int IsA (const char *type)
 
virtual void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
PlusStatus ReadConfiguration (vtkXMLDataElement *aConfig)
 
PlusStatus Reset ()
 
void SetClipRectangle (int clipRectangleOriginPix[2], int clipRectangleSizePix[2])
 
void SetIntermediateFilesOutputDirectory (const std::string &outputDirectory)
 
virtual void SetPlotIntensityProfile (bool)
 
void SetSaveIntermediateImages (bool saveIntermediateImages)
 
void SetSignalTimeRange (double rangeMin, double rangeMax)
 
void SetTrackedFrame (igsioTrackedFrame &aTrackedFrame)
 
void SetTrackedFrameList (vtkIGSIOTrackedFrameList &aTrackedFrameList)
 
PlusStatus Update ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPlusLineSegmentationAlgoNew ()
 
static vtkPlusLineSegmentationAlgoSafeDownCast (vtkObject *o)
 

Protected Member Functions

PlusStatus ComputeCenterOfGravity (std::deque< int > &intensityProfile, int startOfMaxArea, double &centerOfGravity)
 
void ComputeLineParameters (std::vector< itk::Point< double, 2 > > &data, LineParameters &outputParameters)
 
PlusStatus ComputeVideoPositionMetric ()
 
PlusStatus FindLargestPeak (std::deque< int > &intensityProfile, int &maxFromLargestArea, int &maxFromLargestAreaIndex, int &startOfMaxArea)
 
PlusStatus FindPeakStart (std::deque< int > &intensityProfile, int maxFromLargestArea, int startOfMaxArea, double &startOfPeak)
 
void LimitToClipRegion (CharImageType::RegionType &region)
 
void PlotDoubleArray (const std::deque< double > &intensityValues)
 
void PlotIntArray (const std::deque< int > &intensityValues)
 
void SaveIntermediateImage (int frameNumber, CharImageType::Pointer scanlineImage, double x_0, double y_0, double r_x, double r_y, int numOfValidScanlines, const std::vector< itk::Point< double, 2 > > &intensityPeakPositions)
 
PlusStatus VerifyVideoInput ()
 
 vtkPlusLineSegmentationAlgo ()
 
virtual ~vtkPlusLineSegmentationAlgo ()
 

Protected Attributes

std::string IntermediateFilesOutputDirectory
 
CharImageType::IndexValueType m_ClipRectangleOrigin [2]
 
CharImageType::SizeValueType m_ClipRectangleSize [2]
 
std::vector< LineParametersm_LineParameters
 
bool m_SaveIntermediateImages
 
double m_SignalTimeRangeMax
 
double m_SignalTimeRangeMin
 
std::deque< double > m_SignalTimestamps
 
std::deque< double > m_SignalValues
 
vtkSmartPointer< vtkIGSIOTrackedFrameList > m_TrackedFrameList
 
bool PlotIntensityProfile
 

Detailed Description

Detect the position of a line (image of a plane) in an US image sequence.

=Plus=header=begin====================================================== Program: Plus Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved. See License.txt for details. =========================================================Plus=header=end

Definition at line 23 of file vtkPlusLineSegmentationAlgo.h.

Member Typedef Documentation

◆ CharImageType

Definition at line 36 of file vtkPlusLineSegmentationAlgo.h.

◆ CharPixelType

Definition at line 35 of file vtkPlusLineSegmentationAlgo.h.

◆ Superclass

Definition at line 39 of file vtkPlusLineSegmentationAlgo.h.

Constructor & Destructor Documentation

◆ vtkPlusLineSegmentationAlgo()

vtkPlusLineSegmentationAlgo::vtkPlusLineSegmentationAlgo ( )
protected

Definition at line 69 of file vtkPlusLineSegmentationAlgo.cxx.

◆ ~vtkPlusLineSegmentationAlgo()

vtkPlusLineSegmentationAlgo::~vtkPlusLineSegmentationAlgo ( )
protectedvirtual

Definition at line 84 of file vtkPlusLineSegmentationAlgo.cxx.

Member Function Documentation

◆ ComputeCenterOfGravity()

PlusStatus vtkPlusLineSegmentationAlgo::ComputeCenterOfGravity ( std::deque< int > &  intensityProfile,
int  startOfMaxArea,
double &  centerOfGravity 
)
protected

Definition at line 492 of file vtkPlusLineSegmentationAlgo.cxx.

◆ ComputeLineParameters()

void vtkPlusLineSegmentationAlgo::ComputeLineParameters ( std::vector< itk::Point< double, 2 > > &  data,
LineParameters outputParameters 
)
protected

Definition at line 531 of file vtkPlusLineSegmentationAlgo.cxx.

◆ ComputeVideoPositionMetric()

PlusStatus vtkPlusLineSegmentationAlgo::ComputeVideoPositionMetric ( )
protected

Definition at line 185 of file vtkPlusLineSegmentationAlgo.cxx.

◆ FindLargestPeak()

PlusStatus vtkPlusLineSegmentationAlgo::FindLargestPeak ( std::deque< int > &  intensityProfile,
int maxFromLargestArea,
int maxFromLargestAreaIndex,
int startOfMaxArea 
)
protected

Definition at line 413 of file vtkPlusLineSegmentationAlgo.cxx.

◆ FindPeakStart()

PlusStatus vtkPlusLineSegmentationAlgo::FindPeakStart ( std::deque< int > &  intensityProfile,
int  maxFromLargestArea,
int  startOfMaxArea,
double &  startOfPeak 
)
protected

Definition at line 395 of file vtkPlusLineSegmentationAlgo.cxx.

◆ GetClassName()

virtual const char* vtkPlusLineSegmentationAlgo::GetClassName ( )
virtual

◆ GetDetectedLineParameters()

void vtkPlusLineSegmentationAlgo::GetDetectedLineParameters ( std::vector< LineParameters > &  parameters)

Get the parameters of the plane where a line was successfully detected. No frames are skipped, the size of the vector matches the number of input tracked frames. If line detection failed on an image then the lineDetected parameter of the item is set to false.

Definition at line 842 of file vtkPlusLineSegmentationAlgo.cxx.

◆ GetDetectedPositions()

void vtkPlusLineSegmentationAlgo::GetDetectedPositions ( std::deque< double > &  positions)

Get the line positions on the frames where a line was successfully detected. Frames where the line detection was failed are skipped.

Definition at line 836 of file vtkPlusLineSegmentationAlgo.cxx.

◆ GetDetectedTimestamps()

void vtkPlusLineSegmentationAlgo::GetDetectedTimestamps ( std::deque< double > &  timestamps)

Get the timestamps of the frames where a line was successfully detected. Frames where the line detection was failed are skipped.

Definition at line 830 of file vtkPlusLineSegmentationAlgo.cxx.

◆ GetPlotIntensityProfile()

virtual bool vtkPlusLineSegmentationAlgo::GetPlotIntensityProfile ( )
virtual

Plot intensity profile for each scanline. Enable for debugging.

◆ IsA()

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

◆ IsTypeOf()

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

◆ LimitToClipRegion()

void vtkPlusLineSegmentationAlgo::LimitToClipRegion ( CharImageType::RegionType &  region)
protected

Update passed region to fit within the frame size.

Definition at line 857 of file vtkPlusLineSegmentationAlgo.cxx.

◆ New()

static vtkPlusLineSegmentationAlgo* vtkPlusLineSegmentationAlgo::New ( )
static

◆ PlotDoubleArray()

void vtkPlusLineSegmentationAlgo::PlotDoubleArray ( const std::deque< double > &  intensityValues)
protected

Definition at line 782 of file vtkPlusLineSegmentationAlgo.cxx.

◆ PlotIntArray()

void vtkPlusLineSegmentationAlgo::PlotIntArray ( const std::deque< int > &  intensityValues)
protected

Definition at line 734 of file vtkPlusLineSegmentationAlgo.cxx.

◆ PrintSelf()

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

Definition at line 63 of file vtkPlusLineSegmentationAlgo.cxx.

◆ ReadConfiguration()

PlusStatus vtkPlusLineSegmentationAlgo::ReadConfiguration ( vtkXMLDataElement *  aConfig)

Read XML based configuration for the segmentation

Parameters
aConfigRoot element of device set configuration data

Definition at line 923 of file vtkPlusLineSegmentationAlgo.cxx.

◆ Reset()

PlusStatus vtkPlusLineSegmentationAlgo::Reset ( )

Definition at line 980 of file vtkPlusLineSegmentationAlgo.cxx.

◆ SafeDownCast()

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

◆ SaveIntermediateImage()

void vtkPlusLineSegmentationAlgo::SaveIntermediateImage ( int  frameNumber,
CharImageType::Pointer  scanlineImage,
double  x_0,
double  y_0,
double  r_x,
double  r_y,
int  numOfValidScanlines,
const std::vector< itk::Point< double, 2 > > &  intensityPeakPositions 
)
protected

Definition at line 613 of file vtkPlusLineSegmentationAlgo.cxx.

◆ SetClipRectangle()

void vtkPlusLineSegmentationAlgo::SetClipRectangle ( int  clipRectangleOriginPix[2],
int  clipRectangleSizePix[2] 
)

Sets a rectangular region of interest. The algorithm will ignore everything outside the specified image region. If the rectangle size is (0,0) then no clipping is performed.

Definition at line 848 of file vtkPlusLineSegmentationAlgo.cxx.

◆ SetIntermediateFilesOutputDirectory()

void vtkPlusLineSegmentationAlgo::SetIntermediateFilesOutputDirectory ( const std::string &  outputDirectory)

Definition at line 116 of file vtkPlusLineSegmentationAlgo.cxx.

◆ SetPlotIntensityProfile()

virtual void vtkPlusLineSegmentationAlgo::SetPlotIntensityProfile ( bool  )
virtual

◆ SetSaveIntermediateImages()

void vtkPlusLineSegmentationAlgo::SetSaveIntermediateImages ( bool  saveIntermediateImages)

Enable/disable saving of intermediate images for debugging

Definition at line 110 of file vtkPlusLineSegmentationAlgo.cxx.

◆ SetSignalTimeRange()

void vtkPlusLineSegmentationAlgo::SetSignalTimeRange ( double  rangeMin,
double  rangeMax 
)

Sets the time range where the signal will be extracted from. If rangeMax<rangeMin then all the input frames will be used to genereate the signal.

Definition at line 103 of file vtkPlusLineSegmentationAlgo.cxx.

◆ SetTrackedFrame()

void vtkPlusLineSegmentationAlgo::SetTrackedFrame ( igsioTrackedFrame &  aTrackedFrame)

Definition at line 96 of file vtkPlusLineSegmentationAlgo.cxx.

◆ SetTrackedFrameList()

void vtkPlusLineSegmentationAlgo::SetTrackedFrameList ( vtkIGSIOTrackedFrameList &  aTrackedFrameList)

Sets the input US video frames

Definition at line 89 of file vtkPlusLineSegmentationAlgo.cxx.

◆ Update()

PlusStatus vtkPlusLineSegmentationAlgo::Update ( )

Run the line detection algorithm on the input video frames

Parameters
errorDetailif the algorithm fails then the details of the problem are returned in this string

Definition at line 720 of file vtkPlusLineSegmentationAlgo.cxx.

◆ VerifyVideoInput()

PlusStatus vtkPlusLineSegmentationAlgo::VerifyVideoInput ( )
protected

Definition at line 122 of file vtkPlusLineSegmentationAlgo.cxx.

Member Data Documentation

◆ IntermediateFilesOutputDirectory

std::string vtkPlusLineSegmentationAlgo::IntermediateFilesOutputDirectory
protected

Directory where the intermediate files are written to

Definition at line 120 of file vtkPlusLineSegmentationAlgo.h.

◆ m_ClipRectangleOrigin

CharImageType::IndexValueType vtkPlusLineSegmentationAlgo::m_ClipRectangleOrigin[2]
protected

Clip rectangle origin for the processing (in pixels). Everything outside the rectangle is ignored.

Definition at line 129 of file vtkPlusLineSegmentationAlgo.h.

◆ m_ClipRectangleSize

CharImageType::SizeValueType vtkPlusLineSegmentationAlgo::m_ClipRectangleSize[2]
protected

Clip rectangle origin for the processing (in pixels). Everything outside the rectangle is ignored.

Definition at line 132 of file vtkPlusLineSegmentationAlgo.h.

◆ m_LineParameters

std::vector<LineParameters> vtkPlusLineSegmentationAlgo::m_LineParameters
protected

Definition at line 114 of file vtkPlusLineSegmentationAlgo.h.

◆ m_SaveIntermediateImages

bool vtkPlusLineSegmentationAlgo::m_SaveIntermediateImages
protected

If "true" then images of intermediate steps (i.e. scanlines used, detected lines) are saved in local directory

Definition at line 117 of file vtkPlusLineSegmentationAlgo.h.

◆ m_SignalTimeRangeMax

double vtkPlusLineSegmentationAlgo::m_SignalTimeRangeMax
protected

Definition at line 126 of file vtkPlusLineSegmentationAlgo.h.

◆ m_SignalTimeRangeMin

double vtkPlusLineSegmentationAlgo::m_SignalTimeRangeMin
protected

Definition at line 125 of file vtkPlusLineSegmentationAlgo.h.

◆ m_SignalTimestamps

std::deque<double> vtkPlusLineSegmentationAlgo::m_SignalTimestamps
protected

Definition at line 113 of file vtkPlusLineSegmentationAlgo.h.

◆ m_SignalValues

std::deque<double> vtkPlusLineSegmentationAlgo::m_SignalValues
protected

Definition at line 112 of file vtkPlusLineSegmentationAlgo.h.

◆ m_TrackedFrameList

vtkSmartPointer<vtkIGSIOTrackedFrameList> vtkPlusLineSegmentationAlgo::m_TrackedFrameList
protected

Definition at line 110 of file vtkPlusLineSegmentationAlgo.h.

◆ PlotIntensityProfile

bool vtkPlusLineSegmentationAlgo::PlotIntensityProfile
protected

Plot intensity profile for each scanline. Enable for debugging.

Definition at line 123 of file vtkPlusLineSegmentationAlgo.h.


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