/vol/vipdata/irtk/packages/registration/include/irtkLocator.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifdef HAS_VTK
00014
00015 #include <vtkPolyData.h>
00016 #include <vtkCellLocator.h>
00017 #include <vtkPointLocator.h>
00018 #include <vtkKDTreePointLocator.h>
00019 #include <vtkGenericCell.h>
00020 #include <irtkImage.h>
00021
00022 #ifndef _IRTKLOCATOR_H
00023
00024 #define _IRTKLOCATOR_H
00025
00026 class irtkLocator : public irtkObject
00027 {
00028
00029 protected:
00030
00032 vtkCellLocator *cell_locator;
00033
00035 vtkPointLocator *point_locator;
00036
00038 vtkKDTreePointLocator *kd_locator;
00039
00041 vtkGenericCell *cell;
00042
00044 int cellId;
00045
00047 int subId;
00048
00050 double dist2;
00051
00053 double closestPoint[3];
00054
00056 int loc_type;
00057
00059 vtkPolyData *_dataset;
00060
00062 int temp_id;
00063
00064 public:
00065
00067 irtkLocator(void);
00068
00070 void SetElementsPerBucket(int);
00071
00073 void SelectLocatorType(int type);
00074
00075 int GetLocatorType();
00076
00078 void SetDataSet(vtkPolyData *);
00079
00081 int FindClosestPoint(double *xyz);
00082
00084 const char *NameOfClass();
00085 };
00086
00087 inline int irtkLocator::GetLocatorType()
00088 {
00089 return loc_type;
00090
00091 }
00092
00093 #endif
00094
00095 #endif