ITK  5.4.0
Insight Toolkit
itkLevelSetDomainPartitionImageWithKdTree.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkLevelSetDomainPartitionImageWithKdTree_h
19 #define itkLevelSetDomainPartitionImageWithKdTree_h
20 
22 
23 #include "itkListSample.h"
24 #include "itkKdTreeGenerator.h"
25 
26 namespace itk
27 {
34 template <typename TImage>
35 class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionImageWithKdTree : public LevelSetDomainPartitionImage<TImage>
36 {
37 public:
38  ITK_DISALLOW_COPY_AND_MOVE(LevelSetDomainPartitionImageWithKdTree);
39 
44 
45  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
46 
48  itkNewMacro(Self);
49 
50  itkOverrideGetNameOfClassMacro(LevelSetDomainPartitionImageWithKdTree);
51 
52  using ImageType = TImage;
53  using typename Superclass::ListIndexType;
54  using typename Superclass::ListRegionType;
55  using typename Superclass::ListPointType;
56  using typename Superclass::ListIteratorType;
57  using typename Superclass::IdentifierListType;
58 
63  using TreeType = typename TreeGeneratorType::KdTreeType;
64  using KdTreePointer = typename TreeType::Pointer;
65 
67  itkSetObjectMacro(KdTree, TreeType);
68 
70  using NeighborsIdType = unsigned int;
71 
73  itkSetMacro(NumberOfNeighbors, NeighborsIdType);
74  itkGetMacro(NumberOfNeighbors, NeighborsIdType);
79  void
80  PopulateListDomain() override;
81 
82 protected:
84  ~LevelSetDomainPartitionImageWithKdTree() override = default;
85 
88  void
89  PopulateDomainWithKdTree();
90 
91 private:
92  KdTreePointer m_KdTree{};
93  NeighborsIdType m_NumberOfNeighbors{ 10 };
94 };
95 
96 } // end namespace itk
97 
98 #ifndef ITK_MANUAL_INSTANTIATION
99 # include "itkLevelSetDomainPartitionImageWithKdTree.hxx"
100 #endif
101 
102 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::LevelSetDomainPartitionImageWithKdTree
Helper class used to share data in the ScalarChanAndVeseLevelSetFunction.
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:35
itk::LevelSetDomainPartitionImageWithKdTree::NeighborsIdType
unsigned int NeighborsIdType
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:70
itkLevelSetDomainPartitionImage.h
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::LevelSetDomainPartitionImageWithKdTree::SampleType
typename Statistics::ListSample< CentroidVectorType > SampleType
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:60
itk::Statistics::ListSample
This class is the native implementation of the a Sample with an STL container.
Definition: itkListSample.h:51
itk::SmartPointer< Self >
itk::LevelSetDomainPartitionImageWithKdTree::TreeGeneratorType
typename Statistics::KdTreeGenerator< SampleType > TreeGeneratorType
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:61
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkListSample.h
itk::LevelSetDomainPartitionImageWithKdTree::TreePointer
typename TreeGeneratorType::Pointer TreePointer
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:62
itk::LevelSetDomainPartitionImageWithKdTree::CentroidVectorType
typename ListPointType::VectorType CentroidVectorType
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:59
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::LevelSetDomainPartitionImageWithKdTree::KdTreePointer
typename TreeType::Pointer KdTreePointer
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:64
itk::LevelSetDomainPartitionImageWithKdTree::TreeType
typename TreeGeneratorType::KdTreeType TreeType
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:63
itk::LevelSetDomainPartitionImage::ImageType
TImage ImageType
Definition: itkLevelSetDomainPartitionImage.h:50
itkKdTreeGenerator.h
itk::Statistics::KdTreeGenerator
This class generates a KdTree object without centroid information.
Definition: itkKdTreeGenerator.h:71
itk::LevelSetDomainPartitionImage
Helper class used to partition domain and efficiently compute overlap.
Definition: itkLevelSetDomainPartitionImage.h:33