ITK  4.2.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< class TLevelSet, class TDomainPartitioner, class TLevelSetEvolution >
38 {};
39 
40 // For dense image level set.
41 template< class TImage, class 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();
73 
74  virtual void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId );
75 
76  virtual void AfterThreadedExecution();
77 
79  typedef std::vector< RMSChangeAccumulatorType > RMSChangeAccumulatorPerThreadType;
80 
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
95