KWStyle - itkBloxCoreAtomItem.txx
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkBloxCoreAtomItem.txx.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:33 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkBloxCoreAtomItem_txx
18 #define __itkBloxCoreAtomItem_txx
19
20 #include "itkBloxCoreAtomItem.h"
21
22 namespace itk
23 {
24
25 template <unsigned int VImageDimension>
26 BloxCoreAtomItem<VImageDimension>
27 ::BloxCoreAtomItem()
28 {
29
30 }
31
32 template <unsigned int VImageDimension>
33 BloxCoreAtomItem<VImageDimension>
34 ::~BloxCoreAtomItem()
35 {
36
37 }
38
39 template <unsigned int VImageDimension>
40 void
41 BloxCoreAtomItem<VImageDimension>
42 ::CalcCenterAndDiameter()
43 {
44   // Get boundary points
45   PositionType P1 = m_BoundaryPointA->GetPosition();
46   PositionType P2 = m_BoundaryPointB->GetPosition();
47
48   // Calculate the center of the core atom  
49   m_CenterPosition = P1 + (P2 - P1) / 2;
50
51   // Calculate the diameter of the core atom
52   m_Diameter = (P1-P2).GetNorm();
53   
54 }
55
56 // end namespace itk
57
58 #endif
59

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:00PM
© Kitware Inc.