ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkLevelSetEvolutionUpdateLevelSetsThreader.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 itkLevelSetEvolutionUpdateLevelSetsThreader_h
19 #define itkLevelSetEvolutionUpdateLevelSetsThreader_h
20 
22 #include "itkDomainThreader.h"
23 #include "itkLevelSetDenseImage.h"
25 
26 namespace itk
27 {
28 
36 template< typename TLevelSet, typename TDomainPartitioner, typename TLevelSetEvolution >
38 {};
39 
40 // For dense image level set.
41 template< typename TImage, typename TLevelSetEvolution >
42 class LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImage< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >
43  : public DomainThreader< ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >
44 {
45 public:
51 
54 
56  itkNewMacro( Self );
57 
59  typedef typename Superclass::DomainType DomainType;
60  typedef typename Superclass::AssociateType AssociateType;
61 
63  typedef TLevelSetEvolution LevelSetEvolutionType;
64  typedef typename LevelSetEvolutionType::LevelSetContainerType LevelSetContainerType;
65  typedef typename LevelSetEvolutionType::LevelSetType LevelSetType;
66  typedef typename LevelSetEvolutionType::LevelSetImageType LevelSetImageType;
67  typedef typename LevelSetEvolutionType::LevelSetOutputRealType LevelSetOutputRealType;
68 
69 protected:
71 
72  virtual void BeforeThreadedExecution() ITK_OVERRIDE;
73 
74  virtual void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId ) ITK_OVERRIDE;
75 
76  virtual void AfterThreadedExecution() ITK_OVERRIDE;
77 
79  typedef std::vector< RMSChangeAccumulatorType > RMSChangeAccumulatorPerThreadType;
80 
81  RMSChangeAccumulatorPerThreadType m_RMSChangeAccumulatorPerThread;
82 
83 private:
84  LevelSetEvolutionUpdateLevelSetsThreader( const Self & ); // purposely not implemented
85  void operator=( const Self & ); // purposely not implemented
86 };
87 
88 } // end namespace itk
89 
90 #ifndef ITK_MANUAL_INSTANTIATION
91 #include "itkLevelSetEvolutionUpdateLevelSetsThreader.hxx"
92 #endif
93 
94 #endif
Light weight base class for most itk classes.
Multi-threaded processing on a domain by processing sub-domains per thread.
Class for partitioning of an ImageRegion.
Perform more precise accumulation of floating point numbers.
Base class for the &quot;dense&quot; representation of a level-set function on one image.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159