ITK  4.13.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< typename TOutputPath >
41 class ITK_TEMPLATE_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;
65  typedef typename OutputPathType::OffsetType OutputPathOffsetType;
66 
107  OutputPathType * GetOutput();
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) ITK_OVERRIDE;
175 
176 protected:
177  PathSource();
178  virtual ~PathSource() ITK_OVERRIDE {}
179  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
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  ITK_DISALLOW_COPY_AND_ASSIGN(PathSource);
188 };
189 } // end namespace itk
190 
191 #ifndef ITK_MANUAL_INSTANTIATION
192 #include "itkPathSource.hxx"
193 #endif
194 
195 #endif
OutputPathType::IndexType OutputPathIndexType
Definition: itkPathSource.h:64
Light weight base class for most itk classes.
OutputPathType::Pointer OutputPathPointer
Definition: itkPathSource.h:61
Base class for all process objects that output path data.
Definition: itkPathSource.h:41
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
PathSource Self
Definition: itkPathSource.h:45
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
OutputPathType::OffsetType OutputPathOffsetType
Definition: itkPathSource.h:65
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
TOutputPath OutputPathType
Definition: itkPathSource.h:57
SmartPointer< Self > Pointer
Definition: itkPathSource.h:47
OutputPathType::OutputType OutputPathOutputType
Definition: itkPathSource.h:63
ProcessObject Superclass
Definition: itkPathSource.h:46
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual ~PathSource() override
DataObject::Pointer DataObjectPointer
Definition: itkPathSource.h:51
OutputPathType::InputType OutputPathInputType
Definition: itkPathSource.h:62
SmartPointer< const Self > ConstPointer
Definition: itkPathSource.h:48