Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkPlaneGeometryData.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 #include "mitkPlaneGeometryData.h"
19 #include "mitkBaseProcess.h"
21 
23 {
24 }
25 
27 {
28 }
29 
31 {
32  if (geometry == nullptr)
33  SetPlaneGeometry(nullptr);
34  else
35  {
36  PlaneGeometry *geometry2d = dynamic_cast<PlaneGeometry *>(geometry);
37  if (geometry2d == nullptr || dynamic_cast<AbstractTransformGeometry *>(geometry) != nullptr)
38  itkExceptionMacro(<< "Trying to set a geometry which is not a PlaneGeometry into PlaneGeometryData.");
39  SetPlaneGeometry(geometry2d);
40  }
41 }
42 
44 {
45  if (geometry2d != nullptr)
46  {
48  timeGeometry->Initialize(geometry2d, 1);
49  SetTimeGeometry(timeGeometry);
50  Modified();
51  }
52  else
53  Superclass::SetGeometry(geometry2d);
54 }
55 
57 {
58  Superclass::UpdateOutputInformation();
59 }
60 
62 {
63 }
64 
66 {
67  if (GetPlaneGeometry() == nullptr)
68  return true;
69 
70  return false;
71 }
72 
74 {
75  if (GetPlaneGeometry() == nullptr)
76  return false;
77 
78  return true;
79 }
80 
81 void mitk::PlaneGeometryData::SetRequestedRegion(const itk::DataObject *)
82 {
83 }
84 
85 void mitk::PlaneGeometryData::CopyInformation(const itk::DataObject *)
86 {
87 }
virtual void UpdateOutputInformation() override
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
virtual bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
virtual void SetRequestedRegion(const itk::DataObject *data) override
Set the requested region from this data object to match the requested region of the data object passe...
virtual void CopyInformation(const itk::DataObject *data) override
virtual void SetPlaneGeometry(mitk::PlaneGeometry *geometry2d)
Set the reference to the PlaneGeometry that is stored by the object.
Describes a two-dimensional, rectangular plane.
virtual void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
BaseGeometry Describes the geometry of a data object.
virtual void SetGeometry(mitk::BaseGeometry *geometry) override
Set the reference to a PlaneGeometry that is stored by the object.