Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkLabelSetImageSource.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
18 #include "mitkLabelSetImage.h"
19 
21 {
22  // Create the output. We use static_cast<> here because we know the default
23  // output must be of type LabelSetImage
24  mitk::LabelSetImage::Pointer output = static_cast<mitk::LabelSetImage *>(this->MakeOutput(0).GetPointer());
25 
26  Superclass::SetNumberOfRequiredOutputs(1);
27  Superclass::SetNthOutput(0, output.GetPointer());
28 }
29 
31 {
32 }
33 
34 itk::DataObject::Pointer mitk::LabelSetImageSource::MakeOutput(DataObjectPointerArraySizeType /*idx*/)
35 {
36  return OutputType::New().GetPointer();
37 }
38 
40 {
41  itkDebugMacro("MakeOutput(" << name << ")");
42  if (this->IsIndexedOutputName(name))
43  {
44  return this->MakeOutput(this->MakeIndexFromOutputName(name));
45  }
46  return static_cast<itk::DataObject *>(OutputType::New().GetPointer());
47 }
48 
itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
itk::SmartPointer< Self > Pointer
virtual mitkBaseDataSourceGetOutputDeclarations itk::DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override
Superclass of all classes generating labelset images (instances of class LabelSetImage) as output...
LabelSetImage class for handling labels and layers in a segmentation session.
#define mitkBaseDataSourceGetOutputDefinitions(className)
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.