RTK  2.0.1
Reconstruction Toolkit
rtkSumOfSquaresImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK 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 
19 #ifndef rtkSumOfSquaresImageFilter_h
20 #define rtkSumOfSquaresImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
23 
33 namespace rtk
34 {
35 
36 template <class TOutputImage>
37 class ITK_EXPORT SumOfSquaresImageFilter :
38  public itk::InPlaceImageFilter<TOutputImage>
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_ASSIGN(SumOfSquaresImageFilter);
42 
48  using OutputPixelType = typename TOutputImage::PixelType;
49  using OutputImageRegionType = typename TOutputImage::RegionType;
50  using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
51 
53  itkNewMacro(Self);
54 
57 
59  itkGetMacro(SumOfSquares, OutputInternalPixelType);
60 
61 protected:
63  ~SumOfSquaresImageFilter() override = default;
64 
65  void BeforeThreadedGenerateData();
66  void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId ) override;
67  void AfterThreadedGenerateData();
68 
70  std::vector<OutputInternalPixelType> m_VectorOfPartialSSs;
71 };
72 
73 } // end namespace rtk
74 
75 #ifndef ITK_MANUAL_INSTANTIATION
76 #include "rtkSumOfSquaresImageFilter.hxx"
77 #endif
78 
79 #endif
OutputInternalPixelType m_SumOfSquares
typename TOutputImage::PixelType OutputPixelType
typename TOutputImage::RegionType OutputImageRegionType
unsigned int ThreadIdType
std::vector< OutputInternalPixelType > m_VectorOfPartialSSs
typename TOutputImage::InternalPixelType OutputInternalPixelType