ITK  5.0.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:
44  ITK_DISALLOW_COPY_AND_ASSIGN(PathSource);
45 
47  using Self = PathSource;
51 
54 
56  itkNewMacro(Self);
57 
59  itkTypeMacro(PathSource, ProcessObject);
60 
62  using OutputPathType = TOutputPath;
63  using OutputPathPointer = typename OutputPathType::Pointer;
64  using OutputPathInputType = typename OutputPathType::InputType;
65  using OutputPathOutputType = typename OutputPathType::OutputType;
67  using OutputPathOffsetType = typename OutputPathType::OffsetType;
68 
109  OutputPathType * GetOutput();
111 
112  OutputPathType * GetOutput(unsigned int idx);
113 
148  // just calls GraftNthOutput()
149  virtual void GraftOutput(OutputPathType *output);
150 
157  virtual void GraftNthOutput(unsigned int idx, OutputPathType *output);
158 
173  using Superclass::MakeOutput;
174  DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override;
176 
177 protected:
178  PathSource();
179  ~PathSource() override = default;
180  void PrintSelf(std::ostream & os, Indent indent) const override;
181 
182  // Inherit the empty ProcessObject::GenerateData()
183 
184  // Inherit ProcessObject::PrepareOutputs(), which calls Initialize()
185  // (Image replaces w/ empty function)
186 };
187 } // end namespace itk
188 
189 #ifndef ITK_MANUAL_INSTANTIATION
190 #include "itkPathSource.hxx"
191 #endif
192 
193 #endif
Light weight base class for most itk classes.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Base class for all process objects that output path data.
Definition: itkPathSource.h:41
typename OutputPathType::Pointer OutputPathPointer
Definition: itkPathSource.h:63
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
typename OutputPathType::OffsetType OutputPathOffsetType
Definition: itkPathSource.h:67
typename OutputPathType::OutputType OutputPathOutputType
Definition: itkPathSource.h:65
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename OutputPathType::IndexType OutputPathIndexType
Definition: itkPathSource.h:66
SmartPointer< Self > Pointer
typename OutputPathType::InputType OutputPathInputType
Definition: itkPathSource.h:64