ITK  5.2.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  * http://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 
51 
52  using ImageType = TImage;
53  using ListIndexType = typename Superclass::ListIndexType;
54  using ListRegionType = typename Superclass::ListRegionType;
55  using ListPointType = typename Superclass::ListPointType;
56  using ListIteratorType = typename Superclass::ListIteratorType;
57  using IdentifierListType = typename Superclass::IdentifierListType;
58 
62  using TreePointer = typename TreeGeneratorType::Pointer;
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);
76 
79  void
80  PopulateListDomain() override;
81 
82 protected:
84  ~LevelSetDomainPartitionImageWithKdTree() override = default;
85 
88  void
89  PopulateDomainWithKdTree();
90 
91 private:
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
itk::LevelSetDomainPartitionImageWithKdTree::m_KdTree
KdTreePointer m_KdTree
Definition: itkLevelSetDomainPartitionImageWithKdTree.h:92
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:59
itk::LevelSetDomainPartitionImage::ListPointType
typename ListImageType::PointType ListPointType
Definition: itkLevelSetDomainPartitionImage.h:73
itk::LevelSetDomainPartitionImage::ListRegionType
typename ListImageType::RegionType ListRegionType
Definition: itkLevelSetDomainPartitionImage.h:67
itkListSample.h
itk::ImageRegionIteratorWithIndex
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
Definition: itkImageRegionIteratorWithIndex.h:73
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::ListIndexType
typename ListImageType::IndexType ListIndexType
Definition: itkLevelSetDomainPartitionImage.h:71
itk::LevelSetDomainPartitionImage::IdentifierListType
typename Superclass::IdentifierListType IdentifierListType
Definition: itkLevelSetDomainPartitionImage.h:62
itk::LevelSetDomainPartitionImage
Helper class used to partition domain and efficiently compute overlap.
Definition: itkLevelSetDomainPartitionImage.h:33