Isis 3 Programmer Reference
TiffImporter.h
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
80
82 GTIF *m_geotiff;
83
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.
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Container for cube-like labels.
Definition Pvl.h:119
Imports TIFF images as Isis cubes.
TIFF * m_image
LibTIFF representation of the input image.
GTIF * m_geotiff
GeoTiff hanele.
virtual int getBlue(int pixel) const
Retrieves the blue component of the given pixel.
virtual ~TiffImporter()
Destruct the importer.
int samplesPerPixel() const
The number of "samples" (bands in Isis terms) per pixel in the input image.
Pvl upperLeftXY(const Pvl &inLab) const
Convert the Tiff Tiepoint tag data to Upper Left X & Y values for the ISIS cube label mapping group.
virtual bool isRgb() const
Tests to see if the input image is neither grayscale nor has more than three samples per pixel,...
virtual bool isArgb() const
Tests to see if the input image is not grayscale and has more than three samples per pixel,...
TiffImporter(FileName inputName)
Construct the importer.
uint16_t m_samplesPerPixel
The number of "samples" (bands in Isis terms) in the input image.
virtual int getGray(int pixel) const
Retrieves the gray component of the given pixel.
virtual int getGreen(int pixel) const
Retrieves the green component of the given pixel.
uint32_t * m_raster
Buffer holding the raw TIFF image in memory.
virtual int getAlpha(int pixel) const
Retrieves the alpha component of the given pixel.
uint16_t m_photo
The enumerated photometric interpretation of the input image.
virtual int getRed(int pixel) const
Retrieves the red component of the given pixel.
Pvl resolution(const Pvl &inLab) const
Convert the Tiff PixelScale tag data to a singe resolution for the ISIS cube label mapping group.
virtual bool isGrayscale() const
Tests to see if the input image has a "min is white" or "min is black" photometric interpretation,...
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...
Pvl gdalItems(const Pvl &outPvl) const
Convert items in the GDAL tag to the ISIS mapping group.
virtual PvlGroup convertProjection() const
Convert any projection information associated with the input image to an ISIS Mapping group in PVL fo...
PvlGroup m_map
ISIS Mapping group.
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...
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16