ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkGridImageSource.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software 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 __itkGridImageSource_h
19 #define __itkGridImageSource_h
20 
21 #include "itkGenerateImageSource.h"
22 #include "itkFixedArray.h"
23 #include "itkKernelFunctionBase.h"
24 #include "itkVectorContainer.h"
25 
26 #include "vnl/vnl_vector.h"
27 
28 namespace itk
29 {
56 template< typename TOutputImage >
58  :public GenerateImageSource< TOutputImage >
59 {
60 public:
66 
68  itkTypeMacro(GridImageSource, GenerateImageSource);
69 
71  itkNewMacro(Self);
72 
73  typedef double RealType;
74 
76  itkStaticConstMacro(ImageDimension, unsigned int,
77  TOutputImage::ImageDimension);
78 
80  typedef TOutputImage ImageType;
81  typedef typename TOutputImage::RegionType ImageRegionType;
82  typedef typename TOutputImage::PixelType PixelType;
83  typedef typename TOutputImage::SpacingType SpacingType;
84  typedef typename TOutputImage::PointType OriginType;
85  typedef typename TOutputImage::DirectionType DirectionType;
86  typedef typename TOutputImage::SizeType SizeType;
87 
94  typedef vnl_vector< RealType > PixelArrayType;
97 
99  itkSetObjectMacro(KernelFunction, KernelFunctionType);
100  itkGetConstReferenceObjectMacro(KernelFunction, KernelFunctionType);
102 
103  itkSetMacro(Sigma, ArrayType);
104  itkGetConstReferenceMacro(Sigma, ArrayType);
105 
106  itkSetMacro(GridSpacing, ArrayType);
107  itkGetConstReferenceMacro(GridSpacing, ArrayType);
108 
109  itkSetMacro(GridOffset, ArrayType);
110  itkGetConstReferenceMacro(GridOffset, ArrayType);
111 
112  itkSetMacro(WhichDimensions, BoolArrayType);
113  itkGetConstReferenceMacro(WhichDimensions, BoolArrayType);
114 
115  itkSetMacro(Scale, RealType);
116  itkGetConstReferenceMacro(Scale, RealType);
117 
118 protected:
119  GridImageSource();
120  // ~GridImageSource(){} default implementation ok
121  void PrintSelf(std::ostream & os, Indent indent) const;
122 
123  virtual void
125  outputRegionForThread, ThreadIdType threadId);
126 
127  virtual void BeforeThreadedGenerateData();
128 
129 private:
130  GridImageSource(const GridImageSource &); //purposely not implemented
131  void operator=(const GridImageSource &); //purposely not implemented
132 
137 
140 
144 
147 
150 
153 
156 };
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkGridImageSource.hxx"
161 #endif
162 
163 #endif
virtual void ThreadedGenerateData(const ImageRegionType &outputRegionForThread, ThreadIdType threadId)
TOutputImage::RegionType ImageRegionType
KernelFunctionType::Pointer m_KernelFunction
TOutputImage::SpacingType SpacingType
Base class for all process objects that output image data.
FixedArray< bool, itkGetStaticConstMacro(ImageDimension) > BoolArrayType
BoolArrayType m_WhichDimensions
static const unsigned int ImageDimension
SmartPointer< Self > Pointer
KernelFunction is for backward compatibility with ITKv3.
a Base class for image sources which need to have image size, and other meta-data set...
PixelArrayContainerType::Pointer m_PixelArrays
GenerateImageSource< TOutputImage > Superclass
void PrintSelf(std::ostream &os, Indent indent) const
TOutputImage::PointType OriginType
FixedArray< RealType, itkGetStaticConstMacro(ImageDimension) > ArrayType
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
SmartPointer< const Self > ConstPointer
TOutputImage::SizeType SizeType
KernelFunctionBase< double > KernelFunctionType
TOutputImage::DirectionType DirectionType
Generate an n-dimensional image of a grid.
vnl_vector< RealType > PixelArrayType
VectorContainer< SizeValueType, PixelArrayType > PixelArrayContainerType
void operator=(const GridImageSource &)
virtual void BeforeThreadedGenerateData()
TOutputImage::PixelType PixelType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159