ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkPathSource.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkPathSource_h
19 #define __itkPathSource_h
20 
21 #include "itkProcessObject.h"
22 #include "itkPath.h"
23 
24 namespace itk
25 {
40 template< class TOutputPath >
41 class ITK_EXPORT PathSource:public ProcessObject
42 {
43 public:
45  typedef PathSource Self;
49 
52 
54  itkNewMacro(Self);
55 
57  itkTypeMacro(PathSource, ProcessObject);
58 
60  typedef TOutputPath OutputPathType;
61  typedef typename OutputPathType::Pointer OutputPathPointer;
62  typedef typename OutputPathType::InputType OutputPathInputType;
63  typedef typename OutputPathType::OutputType OutputPathOutputType;
64  typedef typename OutputPathType::IndexType OutputPathIndexType;
65  typedef typename OutputPathType::OffsetType OutputPathOffsetType;
66 
107  OutputPathType * GetOutput(void);
109 
110  OutputPathType * GetOutput(unsigned int idx);
111 
146  // just calls GraftNthOutput()
147  virtual void GraftOutput(OutputPathType *output);
149 
156  virtual void GraftNthOutput(unsigned int idx, OutputPathType *output);
157 
172  using Superclass::MakeOutput;
173  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
175 
176 protected:
177  PathSource();
178  virtual ~PathSource() {}
179  void PrintSelf(std::ostream & os, Indent indent) const;
180 
181  // Inherit the empty ProcessObject::GenerateData()
182 
183  // Inherit ProcessObject::PrepareOutputs(), which calls Initialize()
184  // (Image replaces w/ empty function)
185 
186 private:
187  PathSource(const Self &); //purposely not implemented
188  void operator=(const Self &); //purposely not implemented
189 };
190 } // end namespace itk
191 
192 #ifndef ITK_MANUAL_INSTANTIATION
193 #include "itkPathSource.hxx"
194 #endif
195 
196 #endif
197