ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkLevelSetEvolutionComputeIterationThreader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkLevelSetEvolutionComputeIterationThreader_h
00019 #define __itkLevelSetEvolutionComputeIterationThreader_h
00020 
00021 #include "itkDomainThreader.h"
00022 #include "itkThreadedImageRegionPartitioner.h"
00023 
00024 #include "itkLevelSetDenseImageBase.h"
00025 
00026 namespace itk
00027 {
00028 
00036 template< class TLevelSet, class TDomainPartitioner, class TLevelSetEvolution >
00037 class LevelSetEvolutionComputeIterationThreader
00038 {};
00039 
00040 // For dense image level set with a single evolving level set.
00041 template< class TImage, class TLevelSetEvolution >
00042 class LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >
00043   : public DomainThreader< ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >
00044 {
00045 public:
00047   typedef LevelSetEvolutionComputeIterationThreader                                                      Self;
00048   typedef DomainThreader< ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution > Superclass;
00049   typedef SmartPointer< Self >                                                                           Pointer;
00050   typedef SmartPointer< const Self >                                                                     ConstPointer;
00051 
00053   itkTypeMacro( LevelSetEvolutionComputeIterationThreader, DomainThreader );
00054 
00056   itkNewMacro( Self );
00057 
00059   typedef typename Superclass::DomainType    DomainType;
00060   typedef typename Superclass::AssociateType AssociateType;
00061 
00063   typedef TLevelSetEvolution                                     LevelSetEvolutionType;
00064   typedef typename LevelSetEvolutionType::IdListType             IdListType;
00065   typedef typename LevelSetEvolutionType::IdListConstIterator    IdListConstIterator;
00066   typedef typename LevelSetEvolutionType::InputImageType         InputImageType;
00067   typedef typename LevelSetEvolutionType::LevelSetType           LevelSetType;
00068   typedef typename LevelSetEvolutionType::LevelSetImageType      LevelSetImageType;
00069   typedef typename LevelSetEvolutionType::LevelSetDataType       LevelSetDataType;
00070   typedef typename LevelSetEvolutionType::LevelSetOutputRealType LevelSetOutputRealType;
00071   typedef typename LevelSetEvolutionType::LevelSetContainerType  LevelSetContainerType;
00072   typedef typename LevelSetEvolutionType::EquationContainerType  EquationContainerType;
00073   typedef typename LevelSetEvolutionType::TermContainerType      TermContainerType;
00074 
00075 protected:
00076   LevelSetEvolutionComputeIterationThreader();
00077 
00078   virtual void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId );
00079 
00080 private:
00081   LevelSetEvolutionComputeIterationThreader( const Self & ); // purposely not implemented
00082   void operator=( const Self & ); // purposely not implemented
00083 };
00084 
00085 } // namespace itk
00086 
00087 #ifndef ITK_MANUAL_INSTANTIATION
00088 #include "itkLevelSetEvolutionComputeIterationThreader.hxx"
00089 #endif
00090 
00091 #endif
00092