Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 (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 
13 #include "mitkPlaneGeometryData.h"
15 #include "mitkBaseProcess.h"
17 
19 {
20 }
21 
23 {
24 }
25 
27 {
28  if (geometry == nullptr)
29  SetPlaneGeometry(nullptr);
30  else
31  {
32  PlaneGeometry *geometry2d = dynamic_cast<PlaneGeometry *>(geometry);
33  if (geometry2d == nullptr || dynamic_cast<AbstractTransformGeometry *>(geometry) != nullptr)
34  itkExceptionMacro(<< "Trying to set a geometry which is not a PlaneGeometry into PlaneGeometryData.");
35  SetPlaneGeometry(geometry2d);
36  }
37 }
38 
40 {
41  if (geometry2d != nullptr)
42  {
44  timeGeometry->Initialize(geometry2d, 1);
45  SetTimeGeometry(timeGeometry);
46  Modified();
47  }
48  else
49  Superclass::SetGeometry(geometry2d);
50 }
51 
53 {
55 }
56 
58 {
59 }
60 
62 {
63  if (GetPlaneGeometry() == nullptr)
64  return true;
65 
66  return false;
67 }
68 
70 {
71  if (GetPlaneGeometry() == nullptr)
72  return false;
73 
74  return true;
75 }
76 
77 void mitk::PlaneGeometryData::SetRequestedRegion(const itk::DataObject *)
78 {
79 }
80 
81 void mitk::PlaneGeometryData::CopyInformation(const itk::DataObject *)
82 {
83 }
void UpdateOutputInformation() override
void UpdateOutputInformation() override
virtual void SetGeometry(BaseGeometry *aGeometry3D)
Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has...
virtual void SetTimeGeometry(TimeGeometry *geometry)
Set the TimeGeometry of the data, which will be referenced (not copied!).
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
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...
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.
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
virtual mitk::PlaneGeometry * GetPlaneGeometry() const
Get the reference to the PlaneGeometry that is stored by the object.
BaseGeometry Describes the geometry of a data object.
void SetGeometry(mitk::BaseGeometry *geometry) override
Set the reference to a PlaneGeometry that is stored by the object.