Medical Imaging Interaction Toolkit  2018.4.99-9a29ffc6
Medical Imaging Interaction Toolkit
mitkExampleDataStructure.cpp
Go to the documentation of this file.
1 
2 /*============================================================================
3 
4 The Medical Imaging Interaction Toolkit (MITK)
5 
6 Copyright (c) German Cancer Research Center (DKFZ)
7 All rights reserved.
8 
9 Use of this source code is governed by a 3-clause BSD license that can be
10 found in the LICENSE file.
11 
12 ============================================================================*/
13 
15 #include "mitkGeometry3D.h"
16 
17 // implementation of virtual methods
18 
20 {
21 }
22 
24 {
25 }
26 
28 {
29  return false;
30 }
31 
33 {
34  return true;
35 }
36 
38 {
39 }
40 
41 /* Constructor and Destructor */
43 {
45 }
46 
48 {
49 }
50 
51 void mitk::ExampleDataStructure::AppendAString(const std::string input)
52 {
53  m_Data.append(input);
54 }
55 
57  mitk::ExampleDataStructure *rightHandSide,
58  mitk::ScalarType /*eps*/,
59  bool verbose)
60 {
61  bool noDifferenceFound = true;
62 
63  if (rightHandSide == nullptr)
64  {
65  if (verbose)
66  {
67  MITK_INFO << "[Equal( ExampleDataStructure*, ExampleDataStructure* )] rightHandSide nullptr.";
68  }
69  return false;
70  }
71 
72  if (leftHandSide == nullptr)
73  {
74  if (verbose)
75  {
76  MITK_INFO << "[Equal( ExampleDataStructure*, ExampleDataStructure* )] leftHandSide nullptr.";
77  }
78  return false;
79  }
80 
81  if (!(leftHandSide->GetData() == rightHandSide->GetData()))
82  {
83  if (verbose)
84  {
85  MITK_INFO << "[Equal( ExampleDataStructure*, ExampleDataStructure* )] Data not equal. ";
86  MITK_INFO << leftHandSide->GetData() << " != " << rightHandSide->GetData();
87  }
88  noDifferenceFound = false;
89  }
90 
91  return noDifferenceFound;
92 }
#define MITK_INFO
Definition: mitkLogMacros.h:18
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
double ScalarType
virtual std::string GetData()
virtual void SetGeometry(BaseGeometry *aGeometry3D)
Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has...
static Pointer New()
void SetRequestedRegion(const itk::DataObject *) override
Set the requested region from this data object to match the requested region of the data object passe...
void AppendAString(const std::string input)
Append a string to the data string.
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
bool verbose(false)
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.