ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkTransformFileReader.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 __itkTransformFileReader_h
00019 #define __itkTransformFileReader_h
00020 
00021 #include "itkTransformIOBase.h"
00022 
00023 namespace itk
00024 {
00034 class ITK_EXPORT TransformFileReader:public LightProcessObject
00035 {
00036 public:
00037 
00039   typedef TransformFileReader                 Self;
00040   typedef SmartPointer< Self >                Pointer;
00041   typedef TransformBase                       TransformType;
00042 
00043   typedef TransformType::ParametersType      ParametersType;
00044   typedef TransformIOBase::TransformPointer  TransformPointer;
00045   typedef TransformIOBase::TransformListType TransformListType;
00046 
00048   itkNewMacro(Self);
00049 
00051   typedef Object Superclass;
00052   itkTypeMacro(TransformFileReader, LightProcessObject);
00054 
00056   itkSetStringMacro(FileName);
00057 
00059   itkGetStringMacro(FileName);
00060 
00062   virtual void Update();
00063 
00065   TransformListType * GetTransformList() { return &m_TransformList; }
00066 protected:
00067   TransformIOBase::Pointer m_TransformIO;
00068   TransformFileReader(const Self &); //purposely not implemented
00069   void operator=(const Self &);      //purposely not implemented
00070   void PrintSelf(std::ostream & os, Indent indent) const;
00072 
00073   std::string m_FileName;
00074 
00075   TransformFileReader();
00076   virtual ~TransformFileReader();
00077   void CreateTransform(TransformPointer & ptr, const std::string & ClassName);
00078 
00079 private:
00080   TransformListType m_TransformList;
00081 };
00082 } // namespace itk
00083 
00084 #ifdef ITK_IO_FACTORY_REGISTER_MANAGER
00085 #include "itkTransformIOFactoryRegisterManager.h"
00086 #endif
00087 
00088 #endif // __itkTransformFileReader_h
00089