ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMeshSource.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 /*=========================================================================
00019  *
00020  *  Portions of this file are subject to the VTK Toolkit Version 3 copyright.
00021  *
00022  *  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00023  *
00024  *  For complete copyright, license and disclaimer of warranty information
00025  *  please refer to the NOTICE file at the top of the ITK source tree.
00026  *
00027  *=========================================================================*/
00028 #ifndef __itkMeshSource_h
00029 #define __itkMeshSource_h
00030 
00031 
00032 #include "itkProcessObject.h"
00033 
00034 namespace itk
00035 {
00048 template< class TOutputMesh >
00049 class ITK_EXPORT MeshSource:public ProcessObject
00050 {
00051 public:
00053   typedef MeshSource                 Self;
00054   typedef ProcessObject              Superclass;
00055   typedef SmartPointer< Self >       Pointer;
00056   typedef SmartPointer< const Self > ConstPointer;
00057 
00059   itkNewMacro(Self);
00060 
00062   itkTypeMacro(MeshSource, ProcessObject);
00063 
00065   typedef DataObject::Pointer              DataObjectPointer;
00066   typedef TOutputMesh                      OutputMeshType;
00067   typedef typename OutputMeshType::Pointer OutputMeshPointer;
00068 
00069   typedef Superclass::DataObjectIdentifierType DataObjectIdentifierType;
00070 
00072   OutputMeshType * GetOutput(void);
00073 
00074   OutputMeshType * GetOutput(unsigned int idx);
00075 
00079   using Superclass::SetOutput;
00080   void SetOutput(TOutputMesh *output);
00082 
00117   virtual void GraftOutput(DataObject *output);
00119 
00125   virtual void GraftOutput(const DataObjectIdentifierType & key, DataObject *output);
00126 
00127   virtual void GraftNthOutput(unsigned int idx, DataObject *output);
00128 
00142   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
00143   using Superclass::MakeOutput;
00144   virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
00146 
00147 protected:
00148   MeshSource();
00149   virtual ~MeshSource() {}
00150   void PrintSelf(std::ostream & os, Indent indent) const;
00151 
00155   void GenerateInputRequestedRegion();
00156 
00157 private:
00158   MeshSource(const Self &);     //purposely not implemented
00159   void operator=(const Self &); //purposely not implemented
00160 
00163   int m_GenerateDataRegion;
00164   int m_GenerateDataNumberOfRegions;
00165 };
00166 } // end namespace itk
00167 
00168 #ifndef ITK_MANUAL_INSTANTIATION
00169 #include "itkMeshSource.hxx"
00170 #endif
00171 
00172 #endif
00173