NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
itkBinaryThinningImageFilter3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef __itkBinaryThinningImageFilter3D_h
13 #define __itkBinaryThinningImageFilter3D_h
14 
15 #include <itkNeighborhoodIterator.h>
16 #include <itkImageToImageFilter.h>
17 #include <itkImageRegionIteratorWithIndex.h>
18 #include <itkConstantBoundaryCondition.h>
19 
20 namespace itk
21 {
56 template <class TInputImage,class TOutputImage>
58  public ImageToImageFilter<TInputImage,TOutputImage>
59 {
60 public:
63  typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
64  typedef SmartPointer<Self> Pointer;
65  typedef SmartPointer<const Self> ConstPointer;
66 
69 
71  itkTypeMacro( BinaryThinningImageFilter3D, ImageToImageFilter );
72 
74  typedef TInputImage InputImageType;
75 
77  typedef TOutputImage OutputImageType;
78 
80  typedef typename InputImageType::RegionType RegionType;
81 
83  typedef typename RegionType::IndexType IndexType;
84 
87 
90 
92  typedef typename RegionType::SizeType SizeType;
93 
95  typedef typename InputImageType::ConstPointer InputImagePointer;
96 
98  typedef typename OutputImageType::Pointer OutputImagePointer;
99 
101  typedef ConstantBoundaryCondition< TInputImage > ConstBoundaryConditionType;
102 
104  typedef NeighborhoodIterator<TInputImage, ConstBoundaryConditionType> NeighborhoodIteratorType;
105 
107  typedef typename NeighborhoodIteratorType::NeighborhoodType NeighborhoodType;
108 
111 
113  itkStaticConstMacro(InputImageDimension, unsigned int,
114  TInputImage::ImageDimension );
115  itkStaticConstMacro(OutputImageDimension, unsigned int,
116  TOutputImage::ImageDimension );
117 
118 #ifdef ITK_USE_CONCEPT_CHECKING
119 
120  itkConceptMacro(SameDimensionCheck,
121  (Concept::SameDimension<InputImageDimension, 3>));
122  itkConceptMacro(SameTypeCheck,
123  (Concept::SameType<InputImagePixelType, OutputImagePixelType>));
124  itkConceptMacro(InputAdditiveOperatorsCheck,
125  (Concept::AdditiveOperators<InputImagePixelType>));
126  itkConceptMacro(InputConvertibleToIntCheck,
127  (Concept::Convertible<InputImagePixelType, int>));
128  itkConceptMacro(IntConvertibleToInputCheck,
129  (Concept::Convertible<int, InputImagePixelType>));
130  itkConceptMacro(InputIntComparableCheck,
131  (Concept::Comparable<InputImagePixelType, int>));
133 #endif
134 
135 protected:
138  void PrintSelf(std::ostream& os, Indent indent) const;
139 
141  void GenerateData();
142 
144  void PrepareData();
145 
147  void ComputeThinImage();
148 
150  bool isEulerInvariant(NeighborhoodType neighbors, int *LUT);
151  void fillEulerLUT(int *LUT);
153  bool isSimplePoint(NeighborhoodType neighbors);
155  void Octree_labeling(int octant, int label, int *cube);
156 
157 
158 private:
159  BinaryThinningImageFilter3D(const Self&); //purposely not implemented
160  void operator=(const Self&); //purposely not implemented
161 
162 }; // end of BinaryThinningImageFilter3D class
163 
164 } //end namespace itk
165 
166 #ifndef ITK_MANUAL_INSTANTIATION
167 #include "itkBinaryThinningImageFilter3D.txx"
168 #endif
169 
170 #endif
itk::BinaryThinningImageFilter3D::GenerateData
void GenerateData()
itk::BinaryThinningImageFilter3D::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: itkBinaryThinningImageFilter3D.h:98
itk::BinaryThinningImageFilter3D::NeighborhoodIteratorType
NeighborhoodIterator< TInputImage, ConstBoundaryConditionType > NeighborhoodIteratorType
Definition: itkBinaryThinningImageFilter3D.h:104
itk::BinaryThinningImageFilter3D::ComputeThinImage
void ComputeThinImage()
itk::BinaryThinningImageFilter3D::Self
BinaryThinningImageFilter3D Self
Definition: itkBinaryThinningImageFilter3D.h:62
itk::BinaryThinningImageFilter3D::Superclass
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: itkBinaryThinningImageFilter3D.h:63
itk::BinaryThinningImageFilter3D::Pointer
SmartPointer< Self > Pointer
Definition: itkBinaryThinningImageFilter3D.h:64
itk::BinaryThinningImageFilter3D::fillEulerLUT
void fillEulerLUT(int *LUT)
itk::BinaryThinningImageFilter3D::InputImagePointer
InputImageType::ConstPointer InputImagePointer
Definition: itkBinaryThinningImageFilter3D.h:95
itk::BinaryThinningImageFilter3D::Octree_labeling
void Octree_labeling(int octant, int label, int *cube)
itk::BinaryThinningImageFilter3D::~BinaryThinningImageFilter3D
virtual ~BinaryThinningImageFilter3D()
Definition: itkBinaryThinningImageFilter3D.h:137
itk::BinaryThinningImageFilter3D::itkNewMacro
itkNewMacro(Self)
itk::BinaryThinningImageFilter3D::SizeType
RegionType::SizeType SizeType
Definition: itkBinaryThinningImageFilter3D.h:92
itk::BinaryThinningImageFilter3D::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
itk::BinaryThinningImageFilter3D::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: itkBinaryThinningImageFilter3D.h:86
itk::BinaryThinningImageFilter3D::IndexType
RegionType::IndexType IndexType
Definition: itkBinaryThinningImageFilter3D.h:83
itk::BinaryThinningImageFilter3D::PrepareData
void PrepareData()
cx::PixelType
short PixelType
Definition: cxAlgorithmHelpers.h:29
itk::BinaryThinningImageFilter3D::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: itkBinaryThinningImageFilter3D.h:89
itk::BinaryThinningImageFilter3D::OutputImageType
TOutputImage OutputImageType
Definition: itkBinaryThinningImageFilter3D.h:77
itk::BinaryThinningImageFilter3D::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkBinaryThinningImageFilter3D.h:65
itk
Definition: cxToolUsingIGSTK.h:28
itk::BinaryThinningImageFilter3D::ConstBoundaryConditionType
ConstantBoundaryCondition< TInputImage > ConstBoundaryConditionType
Definition: itkBinaryThinningImageFilter3D.h:101
itk::BinaryThinningImageFilter3D::RegionType
InputImageType::RegionType RegionType
Definition: itkBinaryThinningImageFilter3D.h:80
itk::BinaryThinningImageFilter3D::GetThinning
OutputImageType * GetThinning(void)
itk::BinaryThinningImageFilter3D::isSimplePoint
bool isSimplePoint(NeighborhoodType neighbors)
itk::BinaryThinningImageFilter3D::itkStaticConstMacro
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
itk::BinaryThinningImageFilter3D::isEulerInvariant
bool isEulerInvariant(NeighborhoodType neighbors, int *LUT)
itk::BinaryThinningImageFilter3D::NeighborhoodType
NeighborhoodIteratorType::NeighborhoodType NeighborhoodType
Definition: itkBinaryThinningImageFilter3D.h:107
itk::BinaryThinningImageFilter3D::InputImageType
TInputImage InputImageType
Definition: itkBinaryThinningImageFilter3D.h:74
itk::BinaryThinningImageFilter3D::BinaryThinningImageFilter3D
BinaryThinningImageFilter3D()
itk::BinaryThinningImageFilter3D
This filter computes one-pixel-wide skeleton of a 3D input image.
Definition: itkBinaryThinningImageFilter3D.h:57
itk::BinaryThinningImageFilter3D::itkTypeMacro
itkTypeMacro(BinaryThinningImageFilter3D, ImageToImageFilter)