PPMIO.hpp
Go to the documentation of this file.
1 
28 /*
29  * PPMIO.h
30  *
31  * Created on: 08.09.2011
32  * Author: Kim Rinnewitz ( krinnewitz@uos.de )
33  * Modified on: 11.12.2011
34  * Author: Thomas Wiemann ( twiemann@uos.de )
35  * Modified on: 15.02.2011
36  * Author: Denis Meyer ( denmeyer@uos.de )
37  */
38 
39 #ifndef LVR2_PPMIO_HPP_
40 #define LVR2_PPMIO_HPP_
41 
42 #include <string>
43 #include <fstream>
44 #include <iostream>
45 #include <sstream>
46 
47 using std::string;
48 using std::ifstream;
49 using std::stringstream;
50 using std::cout;
51 using std::endl;
52 
53 namespace lvr2
54 {
55 
59 class PPMIO
60 {
61 public:
62  PPMIO();
63  PPMIO( string filename );
64  virtual ~PPMIO() {};
65 
66  void write( string filename );
67  void setDataArray( unsigned char* array, int width, int height );
68 
69  int getHeight() const { return m_height; }
70  int getWidth() const { return m_width; }
71  unsigned char* getPixels() const { return m_pixels; }
72 
73 private:
74  int m_width; // The width of the image
75  int m_height; // The height of the image
76  unsigned char* m_pixels; // The image/pixel data
77 
83  void readLine( ifstream & in, char* buffer );
84 };
85 
86 } // namespace lvr2
87 
88 #endif /* PPMIO_H_ */
lvr2::PPMIO::getHeight
int getHeight() const
Definition: PPMIO.hpp:69
lvr2::PPMIO::~PPMIO
virtual ~PPMIO()
Definition: PPMIO.hpp:64
lvr2::PPMIO::getPixels
unsigned char * getPixels() const
Definition: PPMIO.hpp:71
lvr2::PPMIO::m_pixels
unsigned char * m_pixels
Definition: PPMIO.hpp:76
lvr2::PPMIO::readLine
void readLine(ifstream &in, char *buffer)
Definition: PPMIO.cpp:150
scripts.normalize_multiple.filename
filename
Definition: normalize_multiple.py:60
lvr2::PPMIO::getWidth
int getWidth() const
Definition: PPMIO.hpp:70
lvr2::PPMIO::setDataArray
void setDataArray(unsigned char *array, int width, int height)
Definition: PPMIO.cpp:143
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::PPMIO::m_height
int m_height
Definition: PPMIO.hpp:75
lvr2::PPMIO::write
void write(string filename)
Definition: PPMIO.cpp:129
lvr2::PPMIO
An implementation of the PPM file format.
Definition: PPMIO.hpp:59
lvr2::PPMIO::PPMIO
PPMIO()
Definition: PPMIO.cpp:50
lvr2::PPMIO::m_width
int m_width
Definition: PPMIO.hpp:74


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24