ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkMaskedImageToHistogramFilter.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 __itkMaskedImageToHistogramFilter_h
19 #define __itkMaskedImageToHistogramFilter_h
20 
21 #include "itkHistogram.h"
23 #include "itkBarrier.h"
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
41 template< class TImage, class TMaskImage >
43 {
44 public:
50 
53 
55  itkNewMacro(Self);
56 
57  typedef TImage ImageType;
58  typedef typename ImageType::PixelType PixelType;
59  typedef typename ImageType::RegionType RegionType;
62 
69 
70  typedef TMaskImage MaskImageType;
71  typedef typename MaskImageType::PixelType MaskPixelType;
72 
74  itkSetInputMacro(MaskImage, MaskImageType);
75  itkGetInputMacro(MaskImage, MaskImageType);
77 
81  itkSetGetDecoratedInputMacro(MaskValue, MaskPixelType);
82 
83 protected:
86 
87  virtual void ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress );
88  virtual void ThreadedComputeHistogram( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress );
89 
90 private:
91  MaskedImageToHistogramFilter(const Self &); //purposely not implemented
92  void operator=(const Self &); //purposely not implemented
93 
94 };
95 } // end of namespace Statistics
96 } // end of namespace itk
97 
98 #ifndef ITK_MANUAL_INSTANTIATION
99 #include "itkMaskedImageToHistogramFilter.hxx"
100 #endif
101 
102 #endif
103