Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkSurfaceSource.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkSurfaceSource.h"
14 #include "mitkSurface.h"
15 
17 {
18  // Create the output. We use static_cast<> here because we know the default
19  // output must be of type TOutputImage
20  itk::DataObject::Pointer output = this->MakeOutput(0);
21 
22  Superclass::SetNumberOfRequiredOutputs(1);
23  Superclass::SetNthOutput(0, output);
24 }
25 
27 {
28 }
29 
30 itk::DataObject::Pointer mitk::SurfaceSource::MakeOutput(DataObjectPointerArraySizeType /*idx*/)
31 {
32  return OutputType::New().GetPointer();
33 }
34 
35 itk::DataObject::Pointer mitk::SurfaceSource::MakeOutput(const DataObjectIdentifierType &name)
36 {
37  itkDebugMacro("MakeOutput(" << name << ")");
38  if (this->IsIndexedOutputName(name))
39  {
40  return this->MakeOutput(this->MakeIndexFromOutputName(name));
41  }
42  return static_cast<itk::DataObject *>(mitk::Surface::New().GetPointer());
43 }
44 
Superclass of all classes generating surfaces (instances of class Surface) as output.
itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
itk::DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override
static Pointer New()
#define mitkBaseDataSourceGetOutputDefinitions(className)