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>
31 #include "clitkCommon.h"
36 /** \class EsrfHstXMLFileReader
38 * Reads the XML-format file written by the software High Speed Tomography
39 * at the European Synchrotron Radiation Facility
41 class EsrfHstXMLFileReader : public itk::XMLReader<itk::MetaDataDictionary>
44 /** Standard typedefs */
45 typedef EsrfHstXMLFileReader Self;
46 typedef itk::XMLReader<itk::MetaDataDictionary> Superclass;
47 typedef itk::SmartPointer<Self> Pointer;
49 /** Run-time type information (and related methods). */
50 itkTypeMacro(EsrfHstXMLFileReader, itk::XMLReader);
52 /** Method for creation through the object factory. */
55 /** Determine if a file can be read */
56 int CanReadFile(const char* name) ITK_OVERRIDE;
59 EsrfHstXMLFileReader() {m_OutputObject = &m_Dictionary;};
60 virtual ~EsrfHstXMLFileReader() {};
62 virtual void StartElement(const char * name,const char **atts) ITK_OVERRIDE;
64 virtual void EndElement(const char *name) ITK_OVERRIDE;
66 void CharacterDataHandler(const char *inData, int inLength) ITK_OVERRIDE;
69 EsrfHstXMLFileReader(const Self&); //purposely not implemented
70 void operator=(const Self&); //purposely not implemented
72 itk::MetaDataDictionary m_Dictionary;
73 std::string m_CurCharacterData;