IMP  2.1.1
The Integrative Modeling Platform
XplorReaderWriter.h
Go to the documentation of this file.
1 /**
2  * \file IMP/em/XplorReaderWriter.h
3  * \brief Classes to read or write density files in XPLOR format.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPEM_XPLOR_READER_WRITER_H
10 #define IMPEM_XPLOR_READER_WRITER_H
11 
12 #include <IMP/em/em_config.h>
13 #include "MapReaderWriter.h"
14 #include "DensityHeader.h"
15 #include "internal/XplorHeader.h"
16 #include <math.h>
17 #include <iostream>
18 #include <iomanip>
19 
20 IMPEM_BEGIN_NAMESPACE
21 
22 /** Reader/Writer for xplor files. */
23 class IMPEMEXPORT XplorReaderWriter : public MapReaderWriter
24 {
25 #if !defined(DOXYGEN) && !defined(SWIG)
26 public:
27  void read(const char *filename, float **data, DensityHeader &header);
28  void write(const char *filename, const float *data,
29  const DensityHeader &header );
30 protected:
31  int read_header(std::ifstream & XPLORstream, internal::XplorHeader &header);
32  int read_map(std::ifstream &XPLORstream, float *data,
33  internal::XplorHeader &header);
34 #endif
36 };
37 
38 IMPEM_END_NAMESPACE
39 
40 #endif /* IMPEM_XPLOR_READER_WRITER_H */
The base class to handle reading and writing of density maps.
Metadata for a density file.
DensityMap * read_map(std::string filename, MapReaderWriter *reader)
An abstract class for reading a map.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.