ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkPathSource.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 __itkPathSource_h
00019 #define __itkPathSource_h
00020 
00021 #include "itkProcessObject.h"
00022 #include "itkPath.h"
00023 
00024 namespace itk
00025 {
00040 template< class TOutputPath >
00041 class ITK_EXPORT PathSource:public ProcessObject
00042 {
00043 public:
00045   typedef PathSource                 Self;
00046   typedef ProcessObject              Superclass;
00047   typedef SmartPointer< Self >       Pointer;
00048   typedef SmartPointer< const Self > ConstPointer;
00049 
00051   typedef DataObject::Pointer DataObjectPointer;
00052 
00054   itkNewMacro(Self);
00055 
00057   itkTypeMacro(PathSource, ProcessObject);
00058 
00060   typedef TOutputPath                         OutputPathType;
00061   typedef typename OutputPathType::Pointer    OutputPathPointer;
00062   typedef typename OutputPathType::InputType  OutputPathInputType;
00063   typedef typename OutputPathType::OutputType OutputPathOutputType;
00064   typedef typename OutputPathType::IndexType  OutputPathIndexType;
00065   typedef typename OutputPathType::OffsetType OutputPathOffsetType;
00066 
00107   OutputPathType * GetOutput(void);
00109 
00110   OutputPathType * GetOutput(unsigned int idx);
00111 
00146   // just calls GraftNthOutput()
00147   virtual void GraftOutput(OutputPathType *output);
00149 
00156   virtual void GraftNthOutput(unsigned int idx, OutputPathType *output);
00157 
00171   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
00172   using Superclass::MakeOutput;
00173   virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
00175 
00176 protected:
00177   PathSource();
00178   virtual ~PathSource() {}
00179   void PrintSelf(std::ostream & os, Indent indent) const;
00180 
00181   // Inherit the empty ProcessObject::GenerateData()
00182 
00183   // Inherit ProcessObject::PrepareOutputs(), which calls Initialize()
00184   // (Image replaces w/ empty function)
00185 private:
00186   PathSource(const Self &);     //purposely not implemented
00187   void operator=(const Self &); //purposely not implemented
00188 };
00189 } // end namespace itk
00190 
00191 #ifndef ITK_MANUAL_INSTANTIATION
00192 #include "itkPathSource.hxx"
00193 #endif
00194 
00195 #endif
00196