IMP logo
IMP Reference Guide  2.11.1
The Integrative Modeling Platform
ImageReaderWriter.h
Go to the documentation of this file.
1 /**
2  * \file IMP/em2d/ImageReaderWriter.h
3  * \brief Virtual class for reader/writers of images
4  * Copyright 2007-2019 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/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  public:
21  ImageReaderWriter() : Object("ImageReaderWriter%1%") {}
22  virtual void read(const String &filename, em::ImageHeader &header,
23  cv::Mat &data) const = 0;
24 
25  virtual void read_from_floats(const String &filename, em::ImageHeader &header,
26  cv::Mat &data) const = 0;
27 
28  virtual void read_from_ints(const String &filename, em::ImageHeader &header,
29  cv::Mat &data) const = 0;
30 
31  virtual void write(const String &filename, em::ImageHeader &header,
32  const cv::Mat &data) const = 0;
33 
34  virtual void write_to_floats(const String &filename, em::ImageHeader &header,
35  const cv::Mat &data) const = 0;
36 
37  virtual void write_to_ints(const String &filename, em::ImageHeader &header,
38  const cv::Mat &data) const = 0;
39 
41 };
42 
43 IMPEM2D_END_NAMESPACE
44 
45 #endif /* IMPEM2D_IMAGE_READER_WRITER_H */
Class to deal with the header of Electron Microscopy images in IMP.
Definition: ImageHeader.h:28
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Virtual class for reader/writers of images.
Interface with OpenCV Copyright 2007-2019 IMP Inventors. All rights reserved.
Common base class for heavy weight IMP objects.
Definition: Object.h:106
A shared base class to help in debugging and things.
Header for EM images. Compatible with Spider and Xmipp formats Copyright 2007-2019 IMP Inventors...
std::string String
Basic string value.
Definition: types.h:44