RTK  1.4.0
Reconstruction Toolkit
rtkBlockDiagonalMatrixVectorMultiplyImageFilter.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 #ifndef rtkBlockDiagonalMatrixVectorMultiplyImageFilter_h
19 #define rtkBlockDiagonalMatrixVectorMultiplyImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "rtkMacro.h"
23 
24 namespace rtk
25 {
34 template< class TVectorImage,
37 {
38 public:
43 
45  itkNewMacro(Self)
46 
47 
49 
51  itkStaticConstMacro(nChannels, unsigned int, TVectorImage::PixelType::Dimension);
52 
54  typedef typename TVectorImage::PixelType::ValueType dataType;
55 
57  void SetInput1(const TVectorImage* vector);
58  void SetInput2(const TMatrixImage* matrix);
60 
61 protected:
62  BlockDiagonalMatrixVectorMultiplyImageFilter();
63  ~BlockDiagonalMatrixVectorMultiplyImageFilter() {}
64 
65  void GenerateInputRequestedRegion() ITK_OVERRIDE;
66 
68 #if ITK_VERSION_MAJOR<5
69  void ThreadedGenerateData(const typename TVectorImage::RegionType& outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId)) ITK_OVERRIDE;
70 #else
71  void DynamicThreadedGenerateData(const typename TVectorImage::RegionType& outputRegionForThread) ITK_OVERRIDE;
72 #endif
73 
74 
76  typename TVectorImage::ConstPointer GetInput1();
77  typename TMatrixImage::ConstPointer GetInput2();
79 
80 private:
81  BlockDiagonalMatrixVectorMultiplyImageFilter(const Self &); //purposely not implemented
82  void operator=(const Self &); //purposely not implemented
83 
84 };
85 } //namespace RTK
86 
87 
88 #ifndef ITK_MANUAL_INSTANTIATION
89 #include "rtkBlockDiagonalMatrixVectorMultiplyImageFilter.hxx"
90 #endif
91 
92 #endif
typename Superclass::PixelType PixelType
void ThreadedGenerateData(const typename TVectorImage::RegionType &outputRegionForThread, itk::ThreadIdType) override
itk::ImageToImageFilter< TVectorImage, TVectorImage > Superclass
void SetInput2(const TMatrixImage *matrix)
void SetInput1(const TVectorImage *vector)
unsigned int ThreadIdType