PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
PlusFidPatternRecognition.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2 Program: Plus
3 Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4 See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef _FID_PATTERN_RECOGNITION_H
8 #define _FID_PATTERN_RECOGNITION_H
9 
11 #include "PlusFidSegmentation.h"
12 #include "PlusFidLineFinder.h"
13 #include "PlusFidLabeling.h"
14 
15 #include "vtkXMLDataElement.h"
16 
17 //class igsioTrackedFrame;
18 //class vtkIGSIOTrackedFrameList;
19 
28 class vtkPlusCalibrationExport PlusFidPatternRecognition
29 {
30 
31 public:
33  {
36  PATTERN_RECOGNITION_ERROR_TOO_MANY_CANDIDATES
37  };
38 
40  virtual ~PlusFidPatternRecognition();
41 
43  PlusStatus ReadConfiguration(vtkXMLDataElement* rootConfigElement);
44 
52  PlusStatus RecognizePattern(vtkIGSIOTrackedFrameList* trackedFrameList, PatternRecognitionError& patternRecognitionError, int* numberOfSuccessfullySegmentedImages = NULL, std::vector<unsigned int>* segmentedFramesIndices = NULL);
53 
60  PlusStatus RecognizePattern(igsioTrackedFrame* trackedFrame, PatternRecognitionError& patternRecognitionError, unsigned int frameIndex);
61 
69  PlusStatus RecognizePattern(igsioTrackedFrame* trackedFrame, PlusPatternRecognitionResult& patternRecognitionResult, PatternRecognitionError& patternRecognitionError, unsigned int frameIndex);
70 
72  void DrawDots(PlusFidSegmentation::PixelType* image);
73 
75  void DrawResults(PlusFidSegmentation::PixelType* image);
76 
78  PlusFidSegmentation* GetFidSegmentation() { return & m_FidSegmentation; };
79 
81  PlusFidLineFinder* GetFidLineFinder() { return & m_FidLineFinder; };
82 
84  PlusFidLabeling* GetFidLabeling() { return & m_FidLabeling; };
85 
87  std::vector<PlusFidPattern*>& GetPatterns() { return m_Patterns; };
88 
90  void SetMaxLineLengthToleranceMm(double value);
91 
93  void SetNumberOfMaximumFiducialPointCandidates(int aMax);
94 
96  PlusStatus ReadPhantomDefinition(vtkXMLDataElement* rootConfigElement);
97 
98 protected:
99 
103  std::vector<PlusFidPattern*> m_Patterns;
104 
106 };
107 
108 //-----------------------------------------------------------------------------
109 
110 #endif //_FID_PATTERN_RECOGNITION_H
PlusFidSegmentation * GetFidSegmentation()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
const char const char * value
Definition: phidget22.h:5111
std::vector< PlusFidPattern * > m_Patterns
PlusFidLineFinder * GetFidLineFinder()
std::vector< PlusFidPattern * > & GetPatterns()