Isis 3 Programmer Reference
TiffImporter.h
Go to the documentation of this file.
1 #ifndef TiffImporter_h
2 #define TiffImporter_h
3 
27 #include "ImageImporter.h"
28 
29 #include "geotiff.h"
30 #include "xtiffio.h"
31 #include "tiffio.h"
32 
33 #include "PvlGroup.h"
34 
35 namespace Isis {
36 
37  class Pvl;
38 
61  class TiffImporter : public ImageImporter {
62  public:
63  TiffImporter(FileName inputName);
64  virtual ~TiffImporter();
65 
66  virtual PvlGroup convertProjection() const;
67 
68  virtual bool isGrayscale() const;
69  virtual bool isRgb() const;
70  virtual bool isArgb() const;
71 
72  protected:
73  int samplesPerPixel() const;
74 
75  virtual void updateRawBuffer(int line, int band) const;
76  virtual int getPixel(int s, int l) const;
77 
78  virtual int getGray(int pixel) const;
79  virtual int getRed(int pixel) const;
80  virtual int getGreen(int pixel) const;
81  virtual int getBlue(int pixel) const;
82  virtual int getAlpha(int pixel) const;
83 
84  private:
86  TIFF *m_image;
87 
89  uint32 *m_raster;
90 
92  uint16 m_photo;
93 
96 
98  GTIF *m_geotiff;
99 
102 
103  Pvl gdalItems(const Pvl &outPvl) const;
104  Pvl upperLeftXY(const Pvl &inLab) const;
105  Pvl resolution(const Pvl &inLab) const;
106 
107  };
108 };
109 
110 
111 #endif
virtual ~TiffImporter()
Destruct the importer.
virtual PvlGroup convertProjection() const
Convert any projection information associated with the input image to an ISIS Mapping group in PVL fo...
File name manipulation and expansion.
Definition: FileName.h:116
uint16 m_photo
The enumerated photometric interpretation of the input image.
Definition: TiffImporter.h:92
TIFF * m_image
LibTIFF representation of the input image.
Definition: TiffImporter.h:86
uint16 m_samplesPerPixel
The number of "samples" (bands in Isis terms) in the input image.
Definition: TiffImporter.h:95
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...
uint32 * m_raster
Buffer holding the raw TIFF image in memory.
Definition: TiffImporter.h:89
Imports TIFF images as Isis cubes.
Definition: TiffImporter.h:61
GTIF * m_geotiff
GeoTiff hanele.
Definition: TiffImporter.h:98
virtual int getAlpha(int pixel) const
Retrieves the alpha component of the given pixel.
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...
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 isRgb() const
Tests to see if the input image is neither grayscale nor has more than three samples per pixel...
Pvl gdalItems(const Pvl &outPvl) const
Convert items in the GDAL tag to the ISIS mapping group.
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
TiffImporter(FileName inputName)
Construct the importer.
Container for cube-like labels.
Definition: Pvl.h:135
virtual int getBlue(int pixel) const
Retrieves the blue component of the given pixel.
virtual int getRed(int pixel) const
Retrieves the red component of the given pixel.
virtual int getGreen(int pixel) const
Retrieves the green component of the given pixel.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
PvlGroup m_map
ISIS Mapping group.
Definition: TiffImporter.h:101
int samplesPerPixel() const
The number of "samples" (bands in Isis terms) per pixel in the input image.
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...
Imports images with standard formats into Isis as cubes.
Definition: ImageImporter.h:55
virtual bool isArgb() const
Tests to see if the input image is not grayscale and has more than three samples per pixel...
virtual bool isGrayscale() const
Tests to see if the input image has a "min is white" or "min is black" photometric interpretation...
virtual int getGray(int pixel) const
Retrieves the gray component of the given pixel.