00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef _MITK_STL_VECTOR_CONTAINER_SOURCE_H_ 00019 #define _MITK_STL_VECTOR_CONTAINER_SOURCE_H_ 00020 00021 00022 #include "mitkSTLVectorContainer.h" 00023 #include "mitkCommon.h" 00024 #include "mitkBaseProcess.h" 00025 00026 namespace mitk 00027 { 00028 00029 template <typename T> 00030 class STLVectorContainerSource : public BaseProcess 00031 { 00032 public: 00033 00034 mitkClassMacro( STLVectorContainerSource, BaseProcess ); 00035 00036 itkNewMacro( Self ); 00037 00038 typedef mitk::STLVectorContainer<T> OutputType; 00039 00040 typedef typename OutputType::Pointer OutputTypePointer; 00041 00042 typedef itk::DataObject::Pointer DataObjectPointer; 00043 00050 virtual DataObjectPointer MakeOutput ( unsigned int idx ); 00051 00056 void GenerateInputRequestedRegion(); 00057 00064 void SetOutput( OutputType* output ); 00065 00072 virtual void GraftOutput( OutputType* output ); 00073 00078 OutputType* GetOutput(); 00079 00085 OutputType* GetOutput ( unsigned int idx ); 00086 00087 protected: 00088 STLVectorContainerSource(); 00089 virtual ~STLVectorContainerSource(); 00090 00091 }; 00092 00093 typedef STLVectorContainerSource<int> IntVectorContainerSource; 00094 typedef STLVectorContainerSource<unsigned int> UnsignedIntVectorContainerSource; 00095 typedef STLVectorContainerSource<long> LongVectorContainerSource; 00096 typedef STLVectorContainerSource<unsigned long> UnsignedLongVectorContainerSource; 00097 typedef STLVectorContainerSource<short int> ShortIntVectorContainerSource; 00098 typedef STLVectorContainerSource<short unsigned int> ShortUnsignedIntVectorContainerSource; 00099 typedef STLVectorContainerSource<float> FloatVectorContainerSource; 00100 typedef STLVectorContainerSource<double> DoubleVectorContainerSource; 00101 00102 } // end of namespace mitk 00103 00104 #include "mitkSTLVectorContainerSource.txx" 00105 00106 #endif