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 91 92
|
/*=========================================================================
Program: Image Guided Surgery Software Toolkit
Module: $RCSfile: igstkAffineTransformXMLFileReader.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 __igstkAffineTransformXMLFileReader_h
#define __igstkAffineTransformXMLFileReader_h
#include "igstkTransformXMLFileReaderBase.h"
namespace igstk
{
/** \class AffineTransformXMLFileReader
*
* \brief This class reads an xml file containing a 3D affine transformation.
*
* This class is used for reading an xml file containing a precomputed 3D
* affine transformation. The transformation is described by a 4x4 homogenous
* transformation matrix. The expected file format is:
@verbatim
<precomputed_transform>
<description>
US calibration
</description>
<computation_date>
Thursday July 4 12:00:00 1776
</computation_date>
<transformation estimation_error="0.5">
a b c d
e f g h
i j k l
</transformation>
</precomputed_transform>
@endverbatim
*/
class AffineTransformXMLFileReader : public TransformXMLFileReaderBase
{
public:
//standard typedefs
typedef AffineTransformXMLFileReader Self;
typedef TransformXMLFileReaderBase Superclass;
typedef itk::SmartPointer<Self> Pointer;
//run-time type information (and related methods)
itkTypeMacro( AffineTransformXMLFileReader, 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
AffineTransformXMLFileReader() : TransformXMLFileReaderBase() {}
/**
* This method extracts the transformation parameters from the string data
* which is maintained internally (m_CurrentTagData).
*/
virtual void ProcessTransformation() throw ( FileFormatException );
virtual ~AffineTransformXMLFileReader() {}
private:
AffineTransformXMLFileReader(
const AffineTransformXMLFileReader & other );
const AffineTransformXMLFileReader & operator=(
const AffineTransformXMLFileReader & right );
};
}
#endif //__igstkAffineTransformXMLFileReader_h
|