/usr/include/ossim/imaging/ossimGeneralRasterWriter.h is in libossim-dev 2.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | //*******************************************************************
// Copyright (C) 2001 ImageLinks Inc.
//
// License: See top level LICENSE.txt file.
//
// Author: David Burken
//
// Description:
//
// Contains class declaration for ossimGeneralRasterWriter.
//
//*******************************************************************
// $Id: ossimGeneralRasterWriter.h 22197 2013-03-12 02:00:55Z dburken $
#ifndef ossimGeneralRasterWriter_HEADER
#define ossimGeneralRasterWriter_HEADER 1
#include <ossim/base/ossimConstants.h>
#include <ossim/imaging/ossimImageFileWriter.h>
#include <ossim/base/ossimIrect.h>
#include <ossim/base/ossimFilename.h>
#include <ossim/base/ossimKeywordlist.h>
#include <ossim/base/ossimKeyword.h>
class OSSIM_DLL ossimGeneralRasterWriter : public ossimImageFileWriter
{
public:
/** @brief default constructor */
ossimGeneralRasterWriter();
/**
* void getImageTypeList(std::vector<ossimString>& imageTypeList)const
*
* Appends this writer image types to list "imageTypeList".
*
* This writer has the following types:
* general_raster_bip
* general_raster_bil
* general_raster_bsq
*
* @param imageTypeList stl::vector<ossimString> list to append to.
*/
virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
/**
* Returns a 3-letter extension from the image type descriptor
* (theOutputImageType) that can be used for image file extensions.
*
* @param imageType string representing image type.
*
* @return the 3-letter string extension.
*/
virtual ossimString getExtension() const;
virtual void set_rr_level(ossim_uint32 rr) { theRlevel = rr; }
virtual bool isOpen()const;
virtual bool open();
virtual void close();
/**
* saves the state of the object.
*/
virtual bool saveState(ossimKeywordlist& kwl,
const char* prefix=0)const;
/**
* Method to the load (recreate) the state of an object from a keyword
* list. Return true if ok or false on error.
*/
virtual bool loadState(const ossimKeywordlist& kwl,
const char* prefix=0);
/**
* @brief Method to write the image to a stream.
*
* Callers must call setOutputStream(...) method prior to this.
*
* @return true on success, false on error.
*/
virtual bool writeStream();
/**
* @brief Sets the output stream to write to.
*
* The stream will not be closed/deleted by this object.
*
* @param output The stream to write to.
*/
virtual bool setOutputStream(std::ostream& stream);
protected:
/**
* Write out the file.
* @return true on success, false on error.
*/
virtual bool writeFile();
/** @brief Protected ( this is a ossimRefPtr) destructor. */
virtual ~ossimGeneralRasterWriter();
private:
/**
* Writes image data to output file in BIP(Band Interleaved by Pixel)
* format.
* @return true on success, false on error.
*/
bool writeToBip();
/**
* Writes image data to output file in BIL(Band Interleaved by Line)
* format.
* @return true on success, false on error.
*/
bool writeToBil();
/**
* Writes image data to output file in BSQ(Band Sequential) format.
* @return true on success, false on error.
*/
bool writeToBsq();
/**
* Writes an ossim header file which can be used to load file in ossim.
* Returns true on success, false on error.
*/
void writeHeader() const;
/**
* Writes an envi header file which can be used to load file in envi.
* If the output image file is "foo.ras" then the ossim header file will
* be "foo.hdr".
*/
void writeEnviHeader() const;
/**
* @return The interleave as a string of either: bil, bip, or bsq
*/
ossimString getInterleaveString() const;
std::ostream* theOutputStream;
bool theOwnsStreamFlag;
ossim_uint32 theRlevel;
ossimByteOrder theOutputByteOrder;
/**
* Populated while writting the data
*/
std::vector<double> theMinPerBand;
std::vector<double> theMaxPerBand;
TYPE_DATA
};
#endif
|