RTK  2.6.0
Reconstruction Toolkit
rtkMultiplyByVectorImageFilter.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  * https://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 rtkMultiplyByVectorImageFilter_h
19 #define rtkMultiplyByVectorImageFilter_h
20 
21 #include <itkImageToImageFilter.h>
22 
23 namespace rtk
24 {
39 template <class TInputImage>
40 class ITK_TEMPLATE_EXPORT MultiplyByVectorImageFilter : public itk::ImageToImageFilter<TInputImage, TInputImage>
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_MOVE(MultiplyByVectorImageFilter);
44 
49 
51  itkNewMacro(Self);
52 
54 #ifdef itkOverrideGetNameOfClassMacro
55  itkOverrideGetNameOfClassMacro(MultiplyByVectorImageFilter);
56 #else
58 #endif
59 
60 
62  void
63  SetVector(std::vector<float> vect);
64 
65 protected:
67  ~MultiplyByVectorImageFilter() override = default;
68 
70  void
71  DynamicThreadedGenerateData(const typename TInputImage::RegionType & outputRegionForThread) override;
72 
73 private:
74  std::vector<float> m_Vector;
75 };
76 } // namespace rtk
77 
78 
79 #ifndef ITK_MANUAL_INSTANTIATION
80 # include "rtkMultiplyByVectorImageFilter.hxx"
81 #endif
82 
83 #endif
Multiplies each (n-1) dimension image by the corresponding element in a vector.