Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
itkSpectra1DSupportWindowToMaskImageFilter.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 itkSpectra1DSupportWindowToMaskImageFilter_h
30 #define itkSpectra1DSupportWindowToMaskImageFilter_h
31 
32 #include "itkImageToImageFilter.h"
33 
34 namespace itk
35 {
36 
42 template< typename TInputImage, typename TOutputImage >
44  public ImageToImageFilter< TInputImage,
45  TOutputImage >
46 {
47 public:
48  itkStaticConstMacro( ImageDimension, unsigned int, TInputImage::ImageDimension );
49 
50  typedef TInputImage InputImageType;
51  typedef TOutputImage OutputImageType;
52 
53  typedef typename InputImageType::IndexType IndexType;
55 
58  typedef ImageToImageFilter< InputImageType, OutputImageType > Superclass;
61 
62  itkTypeMacro( Spectra1DSupportWindowToMaskImageFilter, ImageToImageFilter );
63  itkNewMacro( Self );
64 
66  itkGetConstReferenceMacro( MaskIndex, IndexType );
67  itkSetMacro( MaskIndex, IndexType );
68 
70  itkSetMacro( BackgroundValue, OutputPixelType );
71  itkGetConstMacro( BackgroundValue, OutputPixelType );
72 
75  itkSetMacro( ForegroundValue, OutputPixelType );
76  itkGetConstMacro( ForegroundValue, OutputPixelType );
77 
78 
79 protected:
82 
83  virtual void GenerateData() ITK_OVERRIDE;
84 
85 private:
86  Spectra1DSupportWindowToMaskImageFilter( const Self & ); // purposely not implemented
87  void operator=( const Self & ); // purposely not implemented
88 
89  IndexType m_MaskIndex;
90 
91  OutputPixelType m_BackgroundValue;
92  OutputPixelType m_ForegroundValue;
93 };
94 
95 } // end namespace itk
96 
97 #ifndef ITK_MANUAL_INSTANTIATION
98 #include "itkSpectra1DSupportWindowToMaskImageFilter.hxx"
99 #endif
100 
101 #endif // itkSpectra1DSupportWindowToMaskImageFilter_h
ImageToImageFilter< InputImageType, OutputImageType > Superclass
Generate a mask image from the support window at a given index.
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension)
virtual void GenerateData() ITK_OVERRIDE
unsigned short PixelType