2 #ifndef vil_pnm_file_format_h_ 3 #define vil_pnm_file_format_h_ 27 char const*
tag()
const override;
40 char const*
tag()
const override {
return "pbm"; }
47 char const*
tag()
const override {
return "pgm"; }
54 char const*
tag()
const override {
return "ppm"; }
88 unsigned ni()
const override {
return ni_; }
89 unsigned nj()
const override {
return nj_; }
94 unsigned j0,
unsigned nj)
const override;
99 bool get_property(
char const *
tag,
void *prop =
nullptr)
const override;
102 #endif // vil_pnm_file_format_h_ Stream interface for VIL image loaders.
An abstract base class of smart pointers to actual image data in memory.
unsigned bits_per_component_
bool get_property(char const *tag, void *prop=nullptr) const override
Extra property information.
vil_streampos start_of_data_
char const * file_format() const override
Return a string describing the file format.
bool read_header()
This method accepts any valid PNM file (first 3 bytes "P1\n" to "P6\n").
unsigned nplanes() const override
Dimensions: Planes x ni x nj.
Stream interface for VIL image loaders.
unsigned ni() const override
Dimensions: Planes x ni x nj.
Abstract representation of an image source or image destination.
Generic image implementation for PNM files.
vil_image_view_base_sptr get_copy_view() const
Create a read/write view of a copy of all the data.
unsigned long int maxval_
vil_pnm_image(vil_stream *is, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format)
vil_pixel_format format_
Describe the format of each pixel.
bool put_view(const vil_image_view_base &im, unsigned i0, unsigned j0) override
Put the data in this view back into the image source.
Representation of a generic image source or destination.
unsigned nj() const override
Dimensions: Planes x ni x nj.
enum vil_pixel_format pixel_format() const override
Pixel Format.
~vil_pnm_image() override