VTK
vtkHausdorffDistancePointSetFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHausdorffDistancePointSetFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 // Copyright (c) 2011 LTSI INSERM U642
16 // All rights reserved.
17 //
18 // Redistribution and use in source and binary forms, with or without modification,
19 // are permitted provided that the following conditions are met:
20 //
21 // * Redistributions of source code must retain the above copyright notice,
22 // this list of conditions and the following disclaimer.
23 // * Redistributions in binary form must reproduce the above copyright notice,
24 // this list of conditions and the following disclaimer in the documentation and/or
25 // other materials provided with the distribution.
26 // * Neither name of LTSI, INSERM nor the names
27 // of any contributors may be used to endorse or promote products derived from this
28 // software without specific prior written permission.
29 //
30 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
31 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33 // DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY
34 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
35 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
37 // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 
64 #ifndef vtkHausdorffDistancePointSetFilter_h
65 #define vtkHausdorffDistancePointSetFilter_h
66 
67 #include "vtkFiltersModelingModule.h" // For export macro
68 #include "vtkPointSetAlgorithm.h"
69 
70 class VTKFILTERSMODELING_EXPORT vtkHausdorffDistancePointSetFilter
71 : public vtkPointSetAlgorithm
72 {
73 public:
75 
80  void PrintSelf(ostream &os, vtkIndent indent) override;
82 
84 
87  vtkGetVector2Macro(RelativeDistance, double);
89 
91 
94  vtkGetMacro(HausdorffDistance, double);
96 
98  {
100  POINT_TO_CELL
101  };
102 
104 
112  vtkSetMacro(TargetDistanceMethod, int);
113  vtkGetMacro(TargetDistanceMethod, int);
115  { this->SetTargetDistanceMethod(POINT_TO_POINT); }
117  { this->SetTargetDistanceMethod(POINT_TO_CELL); }
118  const char *GetTargetDistanceMethodAsString();
120 
121 protected:
124 
126  int FillInputPortInformation(int port, vtkInformation* info) override;
127 
129  double RelativeDistance[2];
131 
132 private:
134  void operator=(const vtkHausdorffDistancePointSetFilter&) = delete;
135 
136 };
138 {
140  {
141  return "PointToPoint";
142  }
143  else
144  {
145  return "PointToCell";
146  }
147 }
148 #endif
vtkPointSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPointSetAlgorithm.h:43
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkHausdorffDistancePointSetFilter::DistanceMethod
DistanceMethod
Definition: vtkHausdorffDistancePointSetFilter.h:97
vtkPointSetAlgorithm.h
vtkHausdorffDistancePointSetFilter::TargetDistanceMethod
int TargetDistanceMethod
point-to-point if 0, point-to-cell if 1
Definition: vtkHausdorffDistancePointSetFilter.h:128
vtkHausdorffDistancePointSetFilter::HausdorffDistance
double HausdorffDistance
hausdorff distance (max(relative distance))
Definition: vtkHausdorffDistancePointSetFilter.h:130
vtkX3D::port
Definition: vtkX3D.h:447
vtkPointSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkPointSetAlgorithm.h:132
vtkHausdorffDistancePointSetFilter::POINT_TO_POINT
Definition: vtkHausdorffDistancePointSetFilter.h:99
vtkPointSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkHausdorffDistancePointSetFilter
Compute Hausdorff distance between two point sets.
Definition: vtkHausdorffDistancePointSetFilter.h:70
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:70
vtkPointSetAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::info
Definition: vtkX3D.h:376
vtkHausdorffDistancePointSetFilter::SetTargetDistanceMethodToPointToCell
void SetTargetDistanceMethodToPointToCell()
Definition: vtkHausdorffDistancePointSetFilter.h:116
vtkHausdorffDistancePointSetFilter::SetTargetDistanceMethodToPointToPoint
void SetTargetDistanceMethodToPointToPoint()
Definition: vtkHausdorffDistancePointSetFilter.h:114
vtkPointSetAlgorithm::New
static vtkPointSetAlgorithm * New()
vtkHausdorffDistancePointSetFilter::GetTargetDistanceMethodAsString
const char * GetTargetDistanceMethodAsString()
Definition: vtkHausdorffDistancePointSetFilter.h:137