Loading [MathJax]/jax/output/NativeMML/config.js
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 
19 namespace 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 *m_raster;
74 
76  uint16 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
Isis::TiffImporter::m_samplesPerPixel
uint16 m_samplesPerPixel
The number of "samples" (bands in Isis terms) in the input image.
Definition: TiffImporter.h:79
Isis::TiffImporter::~TiffImporter
virtual ~TiffImporter()
Destruct the importer.
Definition: TiffImporter.cpp:85
Isis::TiffImporter::isArgb
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
Isis::TiffImporter::getGray
virtual int getGray(int pixel) const
Retrieves the gray component of the given pixel.
Definition: TiffImporter.cpp:587
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::TiffImporter::convertProjection
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
Isis::TiffImporter::getAlpha
virtual int getAlpha(int pixel) const
Retrieves the alpha component of the given pixel.
Definition: TiffImporter.cpp:635
Isis::TiffImporter::m_photo
uint16 m_photo
The enumerated photometric interpretation of the input image.
Definition: TiffImporter.h:76
Isis::TiffImporter::getPixel
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
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::TiffImporter::m_raster
uint32 * m_raster
Buffer holding the raw TIFF image in memory.
Definition: TiffImporter.h:73
Isis::ImageImporter
Imports images with standard formats into Isis as cubes.
Definition: ImageImporter.h:39
Isis::TiffImporter::resolution
Pvl resolution(const Pvl &inLab) const
Convert the Tiff PixelScale tag data to a singe resolution for the ISIS cube label mapping group.
Definition: TiffImporter.cpp:475
Isis::TiffImporter::isRgb
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
Isis::TiffImporter::TiffImporter
TiffImporter(FileName inputName)
Construct the importer.
Definition: TiffImporter.cpp:33
Isis::TiffImporter::m_geotiff
GTIF * m_geotiff
GeoTiff hanele.
Definition: TiffImporter.h:82
Isis::TiffImporter::upperLeftXY
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.
Definition: TiffImporter.cpp:430
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::TiffImporter::getGreen
virtual int getGreen(int pixel) const
Retrieves the green component of the given pixel.
Definition: TiffImporter.cpp:611
Isis::TiffImporter::gdalItems
Pvl gdalItems(const Pvl &outPvl) const
Convert items in the GDAL tag to the ISIS mapping group.
Definition: TiffImporter.cpp:371
Isis::TiffImporter::getBlue
virtual int getBlue(int pixel) const
Retrieves the blue component of the given pixel.
Definition: TiffImporter.cpp:623
Isis::TiffImporter
Imports TIFF images as Isis cubes.
Definition: TiffImporter.h:45
Isis::TiffImporter::updateRawBuffer
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
Isis::TiffImporter::getRed
virtual int getRed(int pixel) const
Retrieves the red component of the given pixel.
Definition: TiffImporter.cpp:599
Isis::TiffImporter::samplesPerPixel
int samplesPerPixel() const
The number of "samples" (bands in Isis terms) per pixel in the input image.
Definition: TiffImporter.cpp:510
Isis::TiffImporter::isGrayscale
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
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::TiffImporter::m_image
TIFF * m_image
LibTIFF representation of the input image.
Definition: TiffImporter.h:70
Isis::TiffImporter::m_map
PvlGroup m_map
ISIS Mapping group.
Definition: TiffImporter.h:85

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:17:24