NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkSetBoundaryVoxelsToValueFilter.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkSetBoundaryVoxelsToValueFilter_h
16 #define itkSetBoundaryVoxelsToValueFilter_h
17 
18 #include <itkImageToImageFilter.h>
19 
20 namespace itk {
21 
28 template<class TInputImage, class TOutputImage>
30  public ImageToImageFilter< TInputImage, TOutputImage >
31 {
32 public:
35  typedef ImageToImageFilter< TInputImage,TOutputImage > Superclass;
36  typedef SmartPointer< Self > Pointer;
37  typedef SmartPointer< const Self > ConstPointer;
38 
40  itkTypeMacro( SetBoundaryVoxelsToValueFilter, ImageToImageFilter );
41 
43  itkNewMacro(Self);
44 
46  itkStaticConstMacro(ImageDimension, unsigned int,
47  TInputImage::ImageDimension);
48 
50  typedef TInputImage InputImageType;
51  typedef typename InputImageType::Pointer InputImagePointer;
52  typedef typename InputImageType::ConstPointer InputImageConstPointer;
55  typedef typename InputImageType::SpacingType InputImageSpacingType;
57  typedef typename InputImageType::PointType InputImagePointType;
58 
60  typedef TOutputImage OutputImageType;
61  typedef typename OutputImageType::Pointer OutputImagePointer;
65  typedef typename OutputImageType::PointType OutputImagePointType;
67 
68  // Set the value to set voxels on the boundary to
69  itkSetMacro( Value, OutputImagePixelType );
70  // Get the value to set voxels on the boundary to
71  itkGetMacro( Value, OutputImagePixelType );
72 
73 #ifdef ITK_USE_CONCEPT_CHECKING
74 
75  itkConceptMacro(DimensionShouldBe3,
76  (Concept::SameDimension<itkGetStaticConstMacro(InputImageDimension),3>));
77  itkConceptMacro(InputHasNumericTraitsCheck,
78  (Concept::HasNumericTraits<InputImagePixelType>));
79  itkConceptMacro(OutputHasPixelTraitsCheck,
80  (Concept::HasPixelTraits<OutputImagePixelType>));
82 #endif
83 
84 protected:
87  void PrintSelf(std::ostream& os, Indent indent) const;
88 
90  void GenerateData( );
91 
92  // The value to set voxels on the boundary to
93  OutputImagePixelType m_Value;
94 
95 private:
96  SetBoundaryVoxelsToValueFilter(const Self&); //purposely not implemented
97  void operator=(const Self&); //purposely not implemented
98 };
99 
100 } // end namespace itk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkSetBoundaryVoxelsToValueFilter.txx"
104 #endif
105 
106 #endif
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: itkSetBoundaryVoxelsToValueFilter.h:35
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
OutputImageType::PointType OutputImagePointType
Definition: itkSetBoundaryVoxelsToValueFilter.h:65
OutputImageType::PixelType OutputImagePixelType
Definition: itkSetBoundaryVoxelsToValueFilter.h:63
OutputImageType::Pointer OutputImagePointer
Definition: itkSetBoundaryVoxelsToValueFilter.h:61
SmartPointer< Self > Pointer
Definition: itkSetBoundaryVoxelsToValueFilter.h:36
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
Image filter class to set all voxels which are on the boundary of the image to a user specified value...
Definition: itkSetBoundaryVoxelsToValueFilter.h:29
SmartPointer< const Self > ConstPointer
Definition: itkSetBoundaryVoxelsToValueFilter.h:37
TOutputImage OutputImageType
Definition: itkSetBoundaryVoxelsToValueFilter.h:60
InputImageType::ConstPointer InputImageConstPointer
Definition: itkSetBoundaryVoxelsToValueFilter.h:52
InputImageType::PixelType InputImagePixelType
Definition: itkSetBoundaryVoxelsToValueFilter.h:54
SetBoundaryVoxelsToValueFilter Self
Definition: itkSetBoundaryVoxelsToValueFilter.h:34
InputImageType::SpacingType InputImageSpacingType
Definition: itkSetBoundaryVoxelsToValueFilter.h:55
InputImageType::RegionType InputImageRegionType
Definition: itkSetBoundaryVoxelsToValueFilter.h:53
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
OutputImageType::SizeType OutputImageSizeType
Definition: itkSetBoundaryVoxelsToValueFilter.h:66
TInputImage InputImageType
Definition: itkSetBoundaryVoxelsToValueFilter.h:50
InputImageType::Pointer InputImagePointer
Definition: itkSetBoundaryVoxelsToValueFilter.h:51
OutputImagePixelType m_Value
Definition: itkSetBoundaryVoxelsToValueFilter.h:93
InputImageType::PointType InputImagePointType
Definition: itkSetBoundaryVoxelsToValueFilter.h:57
OutputImageType::IndexType OutputImageIndexType
Definition: itkSetBoundaryVoxelsToValueFilter.h:64
OutputImageType::RegionType OutputImageRegionType
Definition: itkSetBoundaryVoxelsToValueFilter.h:62
InputImageType::IndexType InputImageIndexType
Definition: itkSetBoundaryVoxelsToValueFilter.h:56
virtual ~SetBoundaryVoxelsToValueFilter()
Definition: itkSetBoundaryVoxelsToValueFilter.h:86