This file is indexed.

/usr/include/ossim/imaging/ossimNitfWriter.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
//*******************************************************************
//
// License: MIT
//
// See LICENSE.txt file in the top level directory for more details.
//
// Author:  Garrett Potts
//
//*******************************************************************
//  $Id$

#ifndef ossimNitfWriter_HEADER
#define ossimNitfWriter_HEADER 1

#include <ossim/imaging/ossimNitfWriterBase.h>
#include <ossim/base/ossimIoStream.h>
#include <ossim/base/ossimIpt.h>
#include <ossim/base/ossimKeywordlist.h>
#include <ossim/base/ossimRgbLutDataObject.h>
#include <ossim/base/ossimRefPtr.h>
#include <ossim/projection/ossimMapProjectionInfo.h>
#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
#include <ossim/support_data/ossimNitfTextHeaderV2_0.h>
#include <ossim/support_data/ossimNitfTextHeaderV2_1.h>
#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_1.h>
#include <iosfwd>
#include <memory>

class ossimProjection;

class OSSIM_DLL ossimNitfWriter : public ossimNitfWriterBase
{
public:
   ossimNitfWriter(const ossimFilename& filename=ossimFilename(""),
                   ossimImageSource* inputSource = (ossimImageSource*)NULL);
   virtual ~ossimNitfWriter();
   virtual bool isOpen()const;
   virtual bool open();
   virtual void close();
   
   /**
    * void getImageTypeList(std::vector<ossimString>& imageTypeList)const
    *
    * Appends this writer image types to list "imageTypeList".
    *
    * This writer has the following types:
    * nitf_block_band_separate
    * nitf_block_band_sequential
    *
    * @param imageTypeList stl::vector<ossimString> list to append to.
    */   
   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
   
   virtual void setProperty(ossimRefPtr<ossimProperty> property);
   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;

   /**
    * @param propertyNames Array to populate with property names.
    *
    * @note The following names are handled:
    *  file_header
    *  image_header
    *  des_header
    */
   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
   
   void addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag, bool unique = true);
   void addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag, bool unique,
      const ossim_uint32& ownerIndex, const ossimString& tagType);

   /**
    * Saves the state of the writer to kwl with prefix then calls
    * base class ossimImageFileWriter::saveState
    *
    * @param kwl Keyword list to save to.
    *
    * @param prefix Usually something like: "object2."

    * @return true on success, false on failure.
    */
   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;

   /**
    * Initializes the state of the writer from kwl with prefix then calls
    * base class ossimImageFileWriter::loadState
    *
    * @param kwl Keyword list to initialize from.
    *
    * @param prefix Usually something like: "object2."

    * @return true on success, false on failure.
    */
   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);

   virtual bool addTextToNitf(std::string& inputText);

   /** @brief Gets the block size. */
   virtual void getTileSize(ossimIpt& size) const;

   /**
    * Sets the nitf output block size.  Must be divisible by 16.
    *
    * Note:  This is not called setBlockSize just because there was already
    * a virtual setTileSize.
    *
    * @param tileSize Block size.
    */
   virtual void setTileSize(const ossimIpt& tileSize);

   /**
    * Get the image header used for export.
    *
    * @warning Many values will be overwritten at export time.  This includes the 
    *          ossimNitfImageBandV2_1, if the number of bands on the image header
    *          does not match that on the writer.
    *
    * @return The image header.
    */
   virtual ossimNitfImageHeaderV2_1 *getImageHeader();

   /**
    * Get the file header used for export.
    *
    * @warning Many values will be overwritten at export time.
    *
    * @return The file header.
    */
   virtual ossimNitfFileHeaderV2_1 *getFileHeader();

   /**
    * Add a DES to the file.
    *
    * @param des The DES to add to the file.
    */
   virtual void addDataExtensionSegment(const ossimNitfDataExtensionSegmentV2_1& des, bool allowTreOverflow);
protected:
   
   /**
    * @return true on success false on error.
    */
   virtual bool writeFile();
   
   /**
    * write out block band separate
    * 
    * @return true on success and false on error
    */
   virtual bool writeBlockBandSeparate();
   
   /**
    * Outputs in band sequential format.  Band 1 is followed by band
    * 2, ... etc.
    */
   virtual bool writeBlockBandSequential();

   /** Currently disabled... */
   // virtual void addStandardTags();

   std::shared_ptr<ossim::ofstream>      m_str;
   ossimRefPtr<ossimNitfFileHeaderV2_1>  m_fileHeader;
   ossimRefPtr<ossimNitfImageHeaderV2_1> m_imageHeader;
   std::vector<ossimNitfDataExtensionSegmentV2_1> m_dataExtensionSegments;
   ossimRefPtr<ossimNitfTextHeaderV2_1>  m_textHeader;
   std::string                           m_textEntry;
   ossimIpt                              m_blockSize;

TYPE_DATA 
private:
   void takeOverflowTags(bool useFileHeader, bool userDefinedTags);

};

#endif /* #ifndef ossimNitfWriter_HEADER */