File: igstkRigidTransformXMLFileReader.h

package info (click to toggle)
igstk 4.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 36,940 kB
  • ctags: 6,895
  • sloc: cpp: 70,958; makefile: 99; xml: 70
file content (90 lines) | stat: -rw-r--r-- 2,728 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*=========================================================================

  Program:   Image Guided Surgery Software Toolkit
  Module:    $RCSfile: igstkRigidTransformXMLFileReader.h,v $
  Language:  C++
  Date:      $Date: 2009-01-30 20:49:54 $
  Version:   $Revision: 1.1 $

  Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef __igstkRigidTransformXMLFileReader_h
#define __igstkRigidTransformXMLFileReader_h

#include "igstkTransformXMLFileReaderBase.h"


namespace igstk
{
/** \class RigidTransformXMLFileReader
 * 
 *  \brief This class reads an xml file containing a 3D rigid transformation.
 *
 *  This class is used for reading an xml file containing a precomputed 3D 
 *  rigid transformation. The transformation is described by a unit quaternion
 *  and a translation vector. The expected file format is:
     @verbatim
    <precomputed_transform>
   
    <description>
      Bayonet probe calibration
    </description>
   
    <computation_date>
       Thursday July 4 12:00:00 1776
    </computation_date>
   
    <transformation estimation_error="0.5">
       qx qy qz qw tx ty tz 
    </transformation>
   
   </precomputed_transform>
   @endverbatim
*/

class RigidTransformXMLFileReader : public TransformXMLFileReaderBase 
{
public:

    //standard typedefs
  typedef RigidTransformXMLFileReader    Self;
  typedef TransformXMLFileReaderBase     Superclass;
  typedef itk::SmartPointer<Self>        Pointer;

           //run-time type information (and related methods)
  itkTypeMacro( RigidTransformXMLFileReader, TransformXMLFileReaderBase );

         //method for creation through the object factory
  itkNewMacro( Self );

protected:
          //this is the constructor that is called by the factory to 
         //create a new object
  RigidTransformXMLFileReader() : TransformXMLFileReaderBase() {}

  /**
   * This method extracts the transformation parameters from the string data
   * which is maintained internally (m_CurrentTagData).
   */   
  virtual void ProcessTransformation() throw (FileFormatException );

  virtual ~RigidTransformXMLFileReader() {}

private:
  RigidTransformXMLFileReader( 
    const RigidTransformXMLFileReader & other );


  const RigidTransformXMLFileReader & operator=( 
    const RigidTransformXMLFileReader & right );
};


}
#endif //__igstkRigidTransformXMLFileReader_h