Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkTbssImageSource.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 
17 #ifndef __MITK_NRRD_TBSS_VOULMES_IO_FACTORY_CPP__
18 #define __MITK_NRRD_TBSS_VOULMES_IO_FACTORY_CPP__
19 
20 #include "mitkTbssImageSource.h"
21 #include "mitkTbssImage.h"
22 
23 
25 {
26  // Create the output. We use static_cast<> here because we know the default
27  // output must be of type DiffusionImage
29  = static_cast<mitk::TbssImage*>(this->MakeOutput(0).GetPointer());
30 
31  Superclass::SetNumberOfRequiredOutputs(1);
32  Superclass::SetNthOutput(0, output.GetPointer());
33 }
34 
35 itk::DataObject::Pointer mitk::TbssImageSource::MakeOutput ( DataObjectPointerArraySizeType /*idx*/ )
36 {
37  return OutputType::New().GetPointer();
38 }
39 
40 
42 {
43  itkDebugMacro("MakeOutput(" << name << ")");
44  if( this->IsIndexedOutputName(name) )
45  {
46  return this->MakeOutput( this->MakeIndexFromOutputName(name) );
47  }
48  return static_cast<itk::DataObject *>(OutputType::New().GetPointer());
49 }
50 
51 
52 
54 {
55  return static_cast<OutputType*>
56  (this->ProcessObject::GetOutput(idx));
57 }
58 
59 
60 
61 #endif //__MITK_NRRD_TBSS_VOULMES_IO_FACTORY_CPP__
itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
itk::SmartPointer< Self > Pointer
Base of all data objects.
Definition: mitkBaseData.h:39
virtual itk::DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override
this class encapsulates diffusion volumes (vectorimages not yet supported by mitkImage) ...
Definition: mitkTbssImage.h:34
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.