PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusLandmarkDetectionAlgo.cxx
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 
8 
9 
11 
12 //-----------------------------------------------------------------------------
14 {
15 }
16 
17 //-----------------------------------------------------------------------------
19 {
20 }
21 
22 //-----------------------------------------------------------------------------
24 {
25  XML_FIND_NESTED_ELEMENT_REQUIRED(PhantomLandmarkLandmarkDetectionElement, aConfig, "vtkPlusPhantomLandmarkRegistrationAlgo");
26  XML_READ_SCALAR_ATTRIBUTE_OPTIONAL(double, AcquisitionRate, PhantomLandmarkLandmarkDetectionElement);
27 
28  XML_READ_SCALAR_ATTRIBUTE_OPTIONAL(double, FilterWindowTimeSec, PhantomLandmarkLandmarkDetectionElement);
29  XML_READ_SCALAR_ATTRIBUTE_OPTIONAL(double, DetectionTimeSec, PhantomLandmarkLandmarkDetectionElement);
30  XML_READ_SCALAR_ATTRIBUTE_OPTIONAL(double, StylusShaftMinimumDisplacementThresholdMm, PhantomLandmarkLandmarkDetectionElement);
31  XML_READ_SCALAR_ATTRIBUTE_OPTIONAL(double, StylusTipMaximumDisplacementThresholdMm, PhantomLandmarkLandmarkDetectionElement);
32 
33  unsigned int filterWindowSize = 0;
34  unsigned int numberOfWindows = 0;
35  if (ComputeFilterWindowSize(filterWindowSize) == IGSIO_FAIL || ComputeNumberOfWindows(numberOfWindows) == IGSIO_FAIL)
36  {
37  return IGSIO_FAIL;
38  }
39 
40  LOG_DEBUG("AcquisitionRate = " << AcquisitionRate << "[fps] WindowTimeSec = " << FilterWindowTimeSec << "[s] DetectionTimeSec = " << DetectionTimeSec << "[s]");
41  LOG_DEBUG("NumberOfWindows = " << numberOfWindows << " WindowSize = " << filterWindowSize << " MinimunDistanceBetweenLandmarksMm = " << MinimumDistanceBetweenLandmarksMm << "[mm] LandmarkThreshold " << StylusTipMaximumDisplacementThresholdMm << "[mm]");
42 
43  return PLUS_SUCCESS;
44 }
PlusStatus ReadConfiguration(vtkXMLDataElement *aConfig) override
igsioStatus PlusStatus
Definition: PlusCommon.h:40
#define PLUS_SUCCESS
Definition: PlusCommon.h:44
Landmark detection algorithm detects when a calibrated stylus is pivoting around its tip....
vtkStandardNewMacro(vtkPlusLandmarkDetectionAlgo)