ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkParametricImageSource.h
Go to the documentation of this file.
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 __itkParametricImageSource_h
00019 #define __itkParametricImageSource_h
00020 
00021 #include "itkGenerateImageSource.h"
00022 
00023 #include "itkArray.h"
00024 
00025 namespace itk
00026 {
00027 
00043 template <class TOutputImage>
00044 class ITK_EXPORT ParametricImageSource
00045   : public GenerateImageSource< TOutputImage >
00046 {
00047 public:
00049   typedef ParametricImageSource             Self;
00050   typedef GenerateImageSource<TOutputImage> Superclass;
00051   typedef SmartPointer<Self>                Pointer;
00052   typedef SmartPointer<const Self>          ConstPointer;
00053 
00055   typedef DataObject::Pointer DataObjectPointer;
00056 
00058   typedef TOutputImage                        OutputImageType;
00059   typedef typename OutputImageType::Pointer   OutputImagePointer;
00060   typedef typename OutputImageType::PixelType OutputImagePixelType;
00061 
00062   typedef double                              ParametersValueType;
00063   typedef Array< ParametersValueType >        ParametersType;
00064 
00066   itkStaticConstMacro(OutputImageDimension,
00067                       unsigned int,
00068                       TOutputImage::ImageDimension);
00069 
00071   itkTypeMacro(ParametricImageSource, GenerateImageSource);
00072 
00077   virtual void SetParameters( const ParametersType & parameters ) = 0;
00079 
00081   virtual ParametersType GetParameters() const = 0;
00082 
00084   virtual unsigned int GetNumberOfParameters() const = 0;
00085 
00086 protected:
00087   ParametricImageSource() {};
00088   virtual ~ParametricImageSource() {}
00089   void PrintSelf(std::ostream& os, Indent indent) const;
00090 
00091 private:
00092   ParametricImageSource(const Self&); //purposely not implemented
00093   void operator=(const Self&); //purposely not implemented
00094 
00095 };
00096 } // end namespace itk
00097 
00098 
00099 #ifndef ITK_MANUAL_INSTANTIATION
00100 #include "itkParametricImageSource.hxx"
00101 #endif
00102 
00103 #endif
00104