1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
19 #ifndef __clitkEsrfHstXMLFileReader_h
20 #define __clitkEsrfHstXMLFileReader_h
23 #pragma warning ( disable : 4786 )
26 #include <itkXMLFile.h>
27 #include <itkMetaDataDictionary.h>
34 /** \class EsrfHstXMLFileReader
36 * Reads the XML-format file written by the software High Speed Tomography
37 * at the European Synchrotron Radiation Facility
39 class EsrfHstXMLFileReader : public itk::XMLReader<itk::MetaDataDictionary>
42 /** Standard typedefs */
43 typedef EsrfHstXMLFileReader Self;
44 typedef itk::XMLReader<itk::MetaDataDictionary> Superclass;
45 typedef itk::SmartPointer<Self> Pointer;
47 /** Run-time type information (and related methods). */
48 itkTypeMacro(EsrfHstXMLFileReader, itk::XMLReader);
50 /** Method for creation through the object factory. */
53 /** Determine if a file can be read */
54 int CanReadFile(const char* name);
57 EsrfHstXMLFileReader() {m_OutputObject = &m_Dictionary;};
58 virtual ~EsrfHstXMLFileReader() {};
60 virtual void StartElement(const char * name,const char **atts);
62 virtual void EndElement(const char *name);
64 void CharacterDataHandler(const char *inData, int inLength);
67 EsrfHstXMLFileReader(const Self&); //purposely not implemented
68 void operator=(const Self&); //purposely not implemented
70 itk::MetaDataDictionary m_Dictionary;
71 std::string m_CurCharacterData;