Isis 3 Developer 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 
95  uint16 m_samplesPerPixel;
96 
98  GTIF *m_geotiff;
99 
101  PvlGroup m_map;
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.
Definition: TiffImporter.cpp:79
virtual PvlGroup convertProjection() const
Convert any projection information associated with the input image to an ISIS Mapping group in PVL fo...
Definition: TiffImporter.cpp:104
File name manipulation and expansion.
Definition: FileName.h:116
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:565
Imports TIFF images as Isis cubes.
Definition: TiffImporter.h:61
virtual int getAlpha(int pixel) const
Retrieves the alpha component of the given pixel.
Definition: TiffImporter.cpp:629
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:528
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
TiffImporter(FileName inputName)
Construct the importer.
Definition: TiffImporter.cpp:27
Container for cube-like labels.
Definition: Pvl.h:135
virtual int getBlue(int pixel) const
Retrieves the blue component of the given pixel.
Definition: TiffImporter.cpp:617
virtual int getRed(int pixel) const
Retrieves the red component of the given pixel.
Definition: TiffImporter.cpp:593
virtual int getGreen(int pixel) const
Retrieves the green component of the given pixel.
Definition: TiffImporter.cpp:605
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
int samplesPerPixel() const
The number of "samples" (bands in Isis terms) per pixel in the input image.
Definition: TiffImporter.cpp:504
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:551
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...
Definition: TiffImporter.cpp:539
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:515
virtual int getGray(int pixel) const
Retrieves the gray component of the given pixel.
Definition: TiffImporter.cpp:581