Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
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 (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 
14 
16 {
17  // Modify superclass default values, can be overridden by subclasses
18  this->SetNumberOfRequiredInputs(1);
19 }
20 
22 {
23 }
24 
29 {
30  // Process object is not const-correct so the const_cast is required here
31  this->ProcessObject::SetNthInput(0, const_cast<mitk::ImageToPlanarFigureFilter::InputImageType *>(input));
32 }
33 
39 {
40  if (index + 1 > this->GetNumberOfInputs())
41  {
42  this->SetNumberOfRequiredInputs(index + 1);
43  }
44  // Process object is not const-correct so the const_cast is required here
45  this->ProcessObject::SetNthInput(index, const_cast<mitk::ImageToPlanarFigureFilter::InputImageType *>(image));
46 }
47 
52 {
53  if (this->GetNumberOfInputs() < 1)
54  {
55  return nullptr;
56  }
57 
58  return static_cast<const mitk::ImageToPlanarFigureFilter::InputImageType *>(this->ProcessObject::GetInput(0));
59 }
60 
65 {
66  return static_cast<const mitk::ImageToPlanarFigureFilter::InputImageType *>(this->ProcessObject::GetInput(idx));
67 }
68 
69 //-----------------------------------------------------------------------
70 //
72 {
73  Superclass::GenerateInputRequestedRegion();
74 }
75 
76 void mitk::ImageToPlanarFigureFilter::PrintSelf(std::ostream &os, itk::Indent indent) const
77 {
78  Superclass::PrintSelf(os, indent);
79 }
void PrintSelf(std::ostream &os, itk::Indent indent) const override
virtual void SetInput(const InputImageType *image)
Image class for storing images.
Definition: mitkImage.h:72
mitk::Image::Pointer image