ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkLevelSetDomainPartitionImageWithKdTree.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
33 template< typename TImage >
34 class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionImageWithKdTree:
35  public LevelSetDomainPartitionImage< TImage >
36 {
37 public:
38  ITK_DISALLOW_COPY_AND_ASSIGN(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 PopulateListDomain() override;
80 
81 protected:
83  ~LevelSetDomainPartitionImageWithKdTree() override = default;
84 
87  void PopulateDomainWithKdTree();
88 
89 private:
91  NeighborsIdType m_NumberOfNeighbors{ 10 };
92 };
93 
94 } //end namespace itk
95 
96 #ifndef ITK_MANUAL_INSTANTIATION
97 #include "itkLevelSetDomainPartitionImageWithKdTree.hxx"
98 #endif
99 
100 #endif
Light weight base class for most itk classes.
typename ListImageType::IndexType ListIndexType
Helper class used to partition domain and efficiently compute overlap.
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
typename Statistics::ListSample< CentroidVectorType > SampleType
This class generates a KdTree object without centroid information.
typename Superclass::IdentifierListType IdentifierListType
This class is the native implementation of the a Sample with an STL container.
Definition: itkListSample.h:51
typename ListImageType::RegionType ListRegionType
typename Statistics::KdTreeGenerator< SampleType > TreeGeneratorType
typename ListImageType::PointType ListPointType
Helper class used to share data in the ScalarChanAndVeseLevelSetFunction.