Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkCircularProfileTubeElement.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 Copyright (c) German Cancer Research Center,
5 Division of Medical and Biological Informatics.
6 All rights reserved.
7 
8 This software is distributed WITHOUT ANY WARRANTY; without
9 even the implied warranty of MERCHANTABILITY or FITNESS FOR
10 A PARTICULAR PURPOSE.
11 
12 See LICENSE.txt or http://www.mitk.org for details.
13 
14 ===================================================================*/
15 
17 
19 {
20 }
21 
22 mitk::CircularProfileTubeElement::CircularProfileTubeElement(float x, float y, float z, float d) : m_diameter(d)
23 {
24  mitk::FillVector3D(m_coordinates, x, y, z);
25 }
26 
28  : m_coordinates(c), m_diameter(d)
29 {
30 }
31 
33 {
34 }
35 
37 {
38  return m_coordinates;
39 }
40 
42 {
43  m_coordinates = coordinates;
44 }
45 
47 {
48  return m_diameter;
49 }
50 
52 {
53  m_diameter = d;
54 }
55 
57 {
58  // Check if given TubeElement is CircularProfileTubeElement
59  if (dynamic_cast<const mitk::CircularProfileTubeElement *>(&right))
60  {
61  const mitk::CircularProfileTubeElement *element = dynamic_cast<const mitk::CircularProfileTubeElement *>(&right);
62  return ((m_diameter == element->m_diameter) && (m_coordinates == element->m_coordinates));
63  }
64  else
65  return false;
66 }
void SetCoordinates(Point3D coordinates) override
Abstract class for elements which describes tubular structur.
void FillVector3D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z)
Definition: mitkArray.h:110
const Point3D & GetCoordinates() const override
bool operator==(const TubeElement &right) const override
Class for elements which describes tubular structur with a circular cross section.