![]() |
ITK
4.2.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkGaussianImageSource_h 00019 #define __itkGaussianImageSource_h 00020 00021 #include "itkParametricImageSource.h" 00022 #include "itkFixedArray.h" 00023 #include "itkSize.h" 00024 00025 namespace itk 00026 { 00043 template< typename TOutputImage > 00044 class ITK_EXPORT GaussianImageSource : 00045 public ParametricImageSource< TOutputImage > 00046 { 00047 public: 00049 typedef GaussianImageSource Self; 00050 typedef ParametricImageSource< TOutputImage > Superclass; 00051 typedef SmartPointer< Self > Pointer; 00052 typedef SmartPointer< const Self > ConstPointer; 00053 00055 typedef TOutputImage OutputImageType; 00056 00058 typedef typename TOutputImage::PixelType OutputImagePixelType; 00059 00061 typedef typename TOutputImage::RegionType OutputImageRegionType; 00062 00065 typedef typename TOutputImage::SpacingType SpacingType; 00066 00069 typedef typename TOutputImage::PointType PointType; 00070 00073 typedef typename TOutputImage::DirectionType DirectionType; 00074 00076 itkStaticConstMacro(NDimensions, unsigned int, TOutputImage::ImageDimension); 00077 00079 typedef FixedArray< double, itkGetStaticConstMacro(NDimensions) > ArrayType; 00080 00082 typedef typename TOutputImage::SizeType SizeType; 00083 typedef typename TOutputImage::SizeValueType SizeValueType; 00084 00086 typedef typename Superclass::ParametersValueType ParametersValueType; 00087 typedef typename Superclass::ParametersType ParametersType; 00088 00090 itkTypeMacro(GaussianImageSource, ParametricImageSource); 00091 00093 itkNewMacro(Self); 00094 00096 itkSetMacro(Scale, double); 00097 itkGetConstReferenceMacro(Scale, double); 00098 itkSetMacro(Normalized, bool); 00099 itkGetConstReferenceMacro(Normalized, bool); 00100 itkSetMacro(Sigma, ArrayType); 00101 itkGetConstReferenceMacro(Sigma, ArrayType); 00102 itkSetMacro(Mean, ArrayType); 00103 itkGetConstReferenceMacro(Mean, ArrayType); 00105 00111 virtual void SetParameters(const ParametersType & parameters); 00112 virtual ParametersType GetParameters() const; 00114 00118 virtual unsigned int GetNumberOfParameters() const; 00119 00120 protected: 00121 GaussianImageSource(); 00122 // ~GaussianImageSource(); default implementation ok 00123 void PrintSelf(std::ostream & os, Indent indent) const; 00124 00125 void GenerateData(); 00126 00127 private: 00128 GaussianImageSource(const GaussianImageSource &); //purposely not implemented 00129 void operator=(const GaussianImageSource &); //purposely not implemented 00130 00131 SizeType m_Size; // size of the output image 00132 SpacingType m_Spacing; // spacing 00133 PointType m_Origin; // origin 00134 DirectionType m_Direction; // direction 00135 00139 ArrayType m_Sigma; 00140 00142 ArrayType m_Mean; 00143 00145 double m_Scale; 00146 00148 bool m_Normalized; 00149 }; 00150 } // end namespace itk 00151 00152 #ifndef ITK_MANUAL_INSTANTIATION 00153 #include "itkGaussianImageSource.hxx" 00154 #endif 00155 00156 #endif 00157
1.7.6.1