Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
itkTimeGainCompensationImageFilter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 /*=========================================================================
13  *
14  * Copyright Insight Software Consortium
15  *
16  * Licensed under the Apache License, Version 2.0 (the "License");
17  * you may not use this file except in compliance with the License.
18  * You may obtain a copy of the License at
19  *
20  * http://www.apache.org/licenses/LICENSE-2.0.txt
21  *
22  * Unless required by applicable law or agreed to in writing, software
23  * distributed under the License is distributed on an "AS IS" BASIS,
24  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25  * See the License for the specific language governing permissions and
26  * limitations under the License.
27  *
28  *=========================================================================*/
29 #ifndef itkTimeGainCompensationImageFilter_h
30 #define itkTimeGainCompensationImageFilter_h
31 
32 #include "itkImageToImageFilter.h"
33 
34 #include "itkArray2D.h"
35 
36 namespace itk
37 {
38 
48 template< typename TInputImage, typename TOutputImage = TInputImage >
50  public ImageToImageFilter< TInputImage, TOutputImage >
51 {
52 public:
54  typedef TInputImage InputImageType;
55  typedef TOutputImage OutputImageType;
56 
58  typedef ImageToImageFilter< InputImageType, OutputImageType > Superclass;
59 
62 
63  itkTypeMacro( TimeGainCompensationImageFilter, ImageToImageFilter );
64  itkNewMacro( Self );
65 
66  typedef Array2D< double > GainType;
67 
70  itkSetMacro( Gain, GainType );
71  itkGetConstReferenceMacro( Gain, GainType );
72 
73 protected:
74  typedef typename OutputImageType::RegionType OutputImageRegionType;
75 
78 
79  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
80 
81  virtual void BeforeThreadedGenerateData() ITK_OVERRIDE;
82  virtual void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE;
83 
84 private:
85  TimeGainCompensationImageFilter( const Self& ); // purposely not implemented
86  void operator=( const Self& ); // purposely not implemented
87 
88  GainType m_Gain;
89 };
90 
91 }
92 
93 #ifndef ITK_MANUAL_INSTANTIATION
94 #include "itkTimeGainCompensationImageFilter.hxx"
95 #endif
96 
97 #endif // itkTimeGainCompensationImageFilter_h
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
ImageToImageFilter< InputImageType, OutputImageType > Superclass
virtual void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE
Applies a linear piecewise time gain compensation.
virtual void BeforeThreadedGenerateData() ITK_OVERRIDE