Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkImageToPlanarFigureFilter.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 
20 {
21  // Modify superclass default values, can be overridden by subclasses
22  this->SetNumberOfRequiredInputs(1);
23 }
24 
26 {
27 }
28 
33 {
34  // Process object is not const-correct so the const_cast is required here
35  this->ProcessObject::SetNthInput(0, const_cast<mitk::ImageToPlanarFigureFilter::InputImageType *>(input));
36 }
37 
43 {
44  if (index + 1 > this->GetNumberOfInputs())
45  {
46  this->SetNumberOfRequiredInputs(index + 1);
47  }
48  // Process object is not const-correct so the const_cast is required here
49  this->ProcessObject::SetNthInput(index, const_cast<mitk::ImageToPlanarFigureFilter::InputImageType *>(image));
50 }
51 
56 {
57  if (this->GetNumberOfInputs() < 1)
58  {
59  return nullptr;
60  }
61 
62  return static_cast<const mitk::ImageToPlanarFigureFilter::InputImageType *>(this->ProcessObject::GetInput(0));
63 }
64 
69 {
70  return static_cast<const mitk::ImageToPlanarFigureFilter::InputImageType *>(this->ProcessObject::GetInput(idx));
71 }
72 
73 //-----------------------------------------------------------------------
74 //
76 {
77  Superclass::GenerateInputRequestedRegion();
78 }
79 
80 void mitk::ImageToPlanarFigureFilter::PrintSelf(std::ostream &os, itk::Indent indent) const
81 {
82  Superclass::PrintSelf(os, indent);
83 }
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const override
virtual void SetInput(const InputImageType *image)
Image class for storing images.
Definition: mitkImage.h:76