PlusLib
2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
|
Detect the position of a line (image of a plane) in an US image sequence. More...
#include <src/PlusCalibration/vtkLineSegmentationAlgo/vtkPlusLineSegmentationAlgo.h>
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 > ¶meters) |
void | GetDetectedPositions (std::deque< double > &positions) |
void | GetDetectedTimestamps (std::deque< double > ×tamps) |
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 vtkPlusLineSegmentationAlgo * | New () |
static vtkPlusLineSegmentationAlgo * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
PlusStatus | ComputeCenterOfGravity (std::deque< int > &intensityProfile, int startOfMaxArea, double ¢erOfGravity) |
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 ®ion) |
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< LineParameters > | m_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 |
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.
typedef itk::Image<CharPixelType, 2> vtkPlusLineSegmentationAlgo::CharImageType |
Definition at line 36 of file vtkPlusLineSegmentationAlgo.h.
typedef unsigned char vtkPlusLineSegmentationAlgo::CharPixelType |
Definition at line 35 of file vtkPlusLineSegmentationAlgo.h.
typedef vtkObject vtkPlusLineSegmentationAlgo::Superclass |
Definition at line 39 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Definition at line 69 of file vtkPlusLineSegmentationAlgo.cxx.
|
protectedvirtual |
Definition at line 84 of file vtkPlusLineSegmentationAlgo.cxx.
|
protected |
Definition at line 492 of file vtkPlusLineSegmentationAlgo.cxx.
|
protected |
Definition at line 531 of file vtkPlusLineSegmentationAlgo.cxx.
|
protected |
Definition at line 185 of file vtkPlusLineSegmentationAlgo.cxx.
|
protected |
Definition at line 413 of file vtkPlusLineSegmentationAlgo.cxx.
|
protected |
Definition at line 395 of file vtkPlusLineSegmentationAlgo.cxx.
|
virtual |
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.
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.
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.
|
virtual |
Plot intensity profile for each scanline. Enable for debugging.
|
virtual |
|
static |
|
protected |
Update passed region to fit within the frame size.
Definition at line 857 of file vtkPlusLineSegmentationAlgo.cxx.
|
static |
|
protected |
Definition at line 782 of file vtkPlusLineSegmentationAlgo.cxx.
|
protected |
Definition at line 734 of file vtkPlusLineSegmentationAlgo.cxx.
|
virtual |
Definition at line 63 of file vtkPlusLineSegmentationAlgo.cxx.
PlusStatus vtkPlusLineSegmentationAlgo::ReadConfiguration | ( | vtkXMLDataElement * | aConfig | ) |
Read XML based configuration for the segmentation
aConfig | Root element of device set configuration data |
Definition at line 923 of file vtkPlusLineSegmentationAlgo.cxx.
PlusStatus vtkPlusLineSegmentationAlgo::Reset | ( | ) |
Definition at line 980 of file vtkPlusLineSegmentationAlgo.cxx.
|
static |
|
protected |
Definition at line 613 of file vtkPlusLineSegmentationAlgo.cxx.
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.
void vtkPlusLineSegmentationAlgo::SetIntermediateFilesOutputDirectory | ( | const std::string & | outputDirectory | ) |
Definition at line 116 of file vtkPlusLineSegmentationAlgo.cxx.
|
virtual |
void vtkPlusLineSegmentationAlgo::SetSaveIntermediateImages | ( | bool | saveIntermediateImages | ) |
Enable/disable saving of intermediate images for debugging
Definition at line 110 of file vtkPlusLineSegmentationAlgo.cxx.
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.
void vtkPlusLineSegmentationAlgo::SetTrackedFrame | ( | igsioTrackedFrame & | aTrackedFrame | ) |
Definition at line 96 of file vtkPlusLineSegmentationAlgo.cxx.
void vtkPlusLineSegmentationAlgo::SetTrackedFrameList | ( | vtkIGSIOTrackedFrameList & | aTrackedFrameList | ) |
Sets the input US video frames
Definition at line 89 of file vtkPlusLineSegmentationAlgo.cxx.
PlusStatus vtkPlusLineSegmentationAlgo::Update | ( | ) |
Run the line detection algorithm on the input video frames
errorDetail | if the algorithm fails then the details of the problem are returned in this string |
Definition at line 720 of file vtkPlusLineSegmentationAlgo.cxx.
|
protected |
Definition at line 122 of file vtkPlusLineSegmentationAlgo.cxx.
|
protected |
Directory where the intermediate files are written to
Definition at line 120 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Clip rectangle origin for the processing (in pixels). Everything outside the rectangle is ignored.
Definition at line 129 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Clip rectangle origin for the processing (in pixels). Everything outside the rectangle is ignored.
Definition at line 132 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Definition at line 114 of file vtkPlusLineSegmentationAlgo.h.
|
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.
|
protected |
Definition at line 126 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Definition at line 125 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Definition at line 113 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Definition at line 112 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Definition at line 110 of file vtkPlusLineSegmentationAlgo.h.
|
protected |
Plot intensity profile for each scanline. Enable for debugging.
Definition at line 123 of file vtkPlusLineSegmentationAlgo.h.