Isis Developer Reference
TiffImporter.h
Go to the documentation of this file.
1#ifndef TiffImporter_h
2#define TiffImporter_h
3
9/* SPDX-License-Identifier: CC0-1.0 */
10
11#include "ImageImporter.h"
12
13#include "geotiff.h"
14#include "xtiffio.h"
15#include "tiffio.h"
16
17#include "PvlGroup.h"
18
19namespace Isis {
20
21 class Pvl;
22
45 class TiffImporter : public ImageImporter {
46 public:
47 TiffImporter(FileName inputName);
48 virtual ~TiffImporter();
49
50 virtual PvlGroup convertProjection() const;
51
52 virtual bool isGrayscale() const;
53 virtual bool isRgb() const;
54 virtual bool isArgb() const;
55
56 protected:
57 int samplesPerPixel() const;
58
59 virtual void updateRawBuffer(int line, int band) const;
60 virtual int getPixel(int s, int l) const;
61
62 virtual int getGray(int pixel) const;
63 virtual int getRed(int pixel) const;
64 virtual int getGreen(int pixel) const;
65 virtual int getBlue(int pixel) const;
66 virtual int getAlpha(int pixel) const;
67
68 private:
70 TIFF *m_image;
71
73 uint32_t *m_raster;
74
76 uint16_t m_photo;
77
79 uint16_t m_samplesPerPixel;
80
82 GTIF *m_geotiff;
83
85 PvlGroup m_map;
86
87 Pvl gdalItems(const Pvl &outPvl) const;
88 Pvl upperLeftXY(const Pvl &inLab) const;
89 Pvl resolution(const Pvl &inLab) const;
90
91 };
92};
93
94
95#endif
File name manipulation and expansion.
Definition FileName.h:100
Imports images with standard formats into Isis as cubes.
Definition ImageImporter.h:39
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Container for cube-like labels.
Definition Pvl.h:119
Imports TIFF images as Isis cubes.
Definition TiffImporter.h:45
virtual int getBlue(int pixel) const
Retrieves the blue component of the given pixel.
Definition TiffImporter.cpp:623
virtual ~TiffImporter()
Destruct the importer.
Definition TiffImporter.cpp:85
int samplesPerPixel() const
The number of "samples" (bands in Isis terms) per pixel in the input image.
Definition TiffImporter.cpp:510
virtual bool isRgb() const
Tests to see if the input image is neither grayscale nor has more than three samples per pixel,...
Definition TiffImporter.cpp:534
virtual bool isArgb() const
Tests to see if the input image is not grayscale and has more than three samples per pixel,...
Definition TiffImporter.cpp:545
TiffImporter(FileName inputName)
Construct the importer.
Definition TiffImporter.cpp:33
virtual int getGray(int pixel) const
Retrieves the gray component of the given pixel.
Definition TiffImporter.cpp:587
virtual int getGreen(int pixel) const
Retrieves the green component of the given pixel.
Definition TiffImporter.cpp:611
virtual int getAlpha(int pixel) const
Retrieves the alpha component of the given pixel.
Definition TiffImporter.cpp:635
virtual int getRed(int pixel) const
Retrieves the red component of the given pixel.
Definition TiffImporter.cpp:599
virtual bool isGrayscale() const
Tests to see if the input image has a "min is white" or "min is black" photometric interpretation,...
Definition TiffImporter.cpp:521
virtual int getPixel(int s, int l) const
Returns a representation of a pixel for the input format that can then be broken down into specific g...
Definition TiffImporter.cpp:571
virtual PvlGroup convertProjection() const
Convert any projection information associated with the input image to an ISIS Mapping group in PVL fo...
Definition TiffImporter.cpp:110
virtual void updateRawBuffer(int line, int band) const
Does nothing as LibTIFF reads the entire input image into memory, and therefore does not need to be u...
Definition TiffImporter.cpp:557
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16