Medical Imaging Interaction Toolkit  2016.11.0
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,
7 Division of Medical and Biological Informatics.
8 All rights reserved.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without
11 even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 A PARTICULAR PURPOSE.
13 
14 See LICENSE.txt or http://www.mitk.org for details.
15 
16 ===================================================================*/
17 
19 #include "mitkGeometry3D.h"
20 
21 // implementation of virtual methods
22 
24 {
25 }
26 
28 {
29 }
30 
32 {
33  return false;
34 }
35 
37 {
38  return true;
39 }
40 
42 {
43 }
44 
45 /* Constructor and Destructor */
47 {
49 }
50 
52 {
53 }
54 
55 void mitk::ExampleDataStructure::AppendAString(const std::string input)
56 {
57  m_Data.append(input);
58 }
59 
61  mitk::ExampleDataStructure *rightHandSide,
62  mitk::ScalarType /*eps*/,
63  bool verbose)
64 {
65  bool noDifferenceFound = true;
66 
67  if (rightHandSide == NULL)
68  {
69  if (verbose)
70  {
71  MITK_INFO << "[Equal( ExampleDataStructure*, ExampleDataStructure* )] rightHandSide NULL.";
72  }
73  return false;
74  }
75 
76  if (leftHandSide == NULL)
77  {
78  if (verbose)
79  {
80  MITK_INFO << "[Equal( ExampleDataStructure*, ExampleDataStructure* )] leftHandSide NULL.";
81  }
82  return false;
83  }
84 
85  if (!(leftHandSide->GetData() == rightHandSide->GetData()))
86  {
87  if (verbose)
88  {
89  MITK_INFO << "[Equal( ExampleDataStructure*, ExampleDataStructure* )] Data not equal. ";
90  MITK_INFO << leftHandSide->GetData() << " != " << rightHandSide->GetData();
91  }
92  noDifferenceFound = false;
93  }
94 
95  return noDifferenceFound;
96 }
#define MITK_INFO
Definition: mitkLogMacros.h:22
virtual 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()
virtual void UpdateOutputInformation() override
virtual 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.
virtual bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
virtual 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.