IMP  2.1.0
The Integrative Modeling Platform
ImageReaderWriter.h
Go to the documentation of this file.
1 /**
2  * \file em2d/ImageReaderWriter.h
3  * \brief Virtual class for reader/writers of images
4  * Copyright 2007-2013 IMP Inventors. All rights reserved.
5 */
6 
7 #ifndef IMPEM2D_IMAGE_READER_WRITER_H
8 #define IMPEM2D_IMAGE_READER_WRITER_H
9 
10 #include "IMP/em2d/em2d_config.h"
11 #include "IMP/base/Object.h"
13 #include "IMP/em/ImageHeader.h"
14 #include <iostream>
15 
16 IMPEM2D_BEGIN_NAMESPACE
17 
18 //! Virtual class for reader/writers of images
20 {
21 public:
22  ImageReaderWriter(): Object("ImageReaderWriter%1%"){}
23  virtual void read(const String &filename, em::ImageHeader& header,
24  cv::Mat &data) const = 0;
25 
26  virtual void read_from_floats(const String &filename, em::ImageHeader& header,
27  cv::Mat &data) const = 0;
28 
29  virtual void read_from_ints(const String &filename, em::ImageHeader& header,
30  cv::Mat &data) const = 0;
31 
32  virtual void write(const String &filename, em::ImageHeader& header,
33  const cv::Mat &data) const = 0;
34 
35  virtual void write_to_floats(const String &filename,
36  em::ImageHeader& header,
37  const cv::Mat &data) const = 0;
38 
39  virtual void write_to_ints(const String &filename,
40  em::ImageHeader& header,
41  const cv::Mat &data) const = 0;
42 
44 };
45 
46 IMPEM2D_END_NAMESPACE
47 
48 #endif /* IMPEM2D_IMAGE_READER_WRITER_H */
Class to deal with the header of Electron Microsocopy images in IMP.
Definition: ImageHeader.h:28
Virtual class for reader/writers of images.
inteface with OpenCV Copyright 2007-2013 IMP Inventors. All rights reserved.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Common base class for heavy weight IMP objects.
A shared base class to help in debugging and things.
Header for EM images. Compatible with Spider and Xmipp formats Copyright 2007-2013 IMP Inventors...
std::string String
Basic string value.
Definition: base/types.h:44