/usr/include/ossim/imaging/ossimMetadataFileWriter.h is in libossim-dev 1.7.21-4.
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 175 176 | //*******************************************************************
// Copyright (C) 2003 Storage Area Networks, Inc.
//
// License: LGPL
//
// See LICENSE.txt file in the top level directory for more details.
//
// Author: Kenneth Melero (kmelero@sanz.com)
//
//*******************************************************************
// $Id: ossimMetadataFileWriter.h 13312 2008-07-27 01:26:52Z gpotts $
#ifndef ossimMetadataFileWriter_H
#define ossimMetadataFileWriter_H
#include <ossim/base/ossimConstants.h>
#include <ossim/base/ossimConnectableObject.h>
#include <ossim/base/ossimProcessInterface.h>
#include <ossim/base/ossimConnectableObjectListener.h>
#include <ossim/base/ossimFilename.h>
#include <ossim/base/ossimIrect.h>
#include <ossim/base/ossimObjectEvents.h>
#include <ossim/base/ossimProcessProgressEvent.h>
class ossimImageSource;
/**
* ossimMetadataFileWriter
*
* Typical usage something like this:
*
* ossimObject* obj = ossimImageMetaDataWriterRegistry::instance()->
* createObject(ossimString("ossimReadmeFileWriter"));
* if (!obj)
* {
* return;
* }
* ossimMetadataFileWriter* mw = PTR_CAST(ossimMetadataFileWriter, obj);
* if (!mw)
* {
* return;
* }
*
* mw->setFilename(xmlFile);
* mw->loadState(kwl);
* mw->connectMyInputTo(ih.get());
* mw->execute();
* delete mw;
*/
class OSSIMDLLEXPORT ossimMetadataFileWriter :
public ossimConnectableObject,
public ossimProcessInterface,
public ossimConnectableObjectListener
{
public:
ossimMetadataFileWriter();
virtual ~ossimMetadataFileWriter();
virtual ossimObject* getObject();
virtual const ossimObject* getObject() const;
virtual void initialize();
virtual bool execute();
virtual void setPercentComplete(double percentComplete);
virtual void setFilename(const ossimFilename& file);
const ossimFilename& getFilename()const;
/**
* Load state method:
*
* This method call base class ossimConnectableObject::loadState then
* looks for its keywords.
*
* @param kwl Keyword list to initialize from.
*
* @param prefix Usually something like: "object1."
*
* @return This method will alway return true as it is intended to be
* used in conjuction with the set methods.
*
* Keywords picked up by loadState:
*
* filename: foo.tfw
*
* (pixel_type should be area or point)
*
* pixel_type: area
*/
virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
bool canConnectMyInputTo(ossim_int32 inputIndex,
const ossimConnectableObject* object) const;
virtual void disconnectInputEvent(ossimConnectionEvent& event);
virtual void connectInputEvent(ossimConnectionEvent& event);
virtual void propertyEvent(ossimPropertyEvent& event);
/**
* Ossim uses a concept of "pixel is point" internally.
*
* This means that if you say a tie point is 30.0N -81.0W, the center of
* the pixel at the tie point is 30.0N -81.0W.
*
*/
virtual void setPixelType(ossimPixelType pixelType);
virtual ossimPixelType getPixelType() const;
/**
* Sets the area of interest to write the meta data for.
*
* @param areaOfInterest Sets theAreaOfInterest.
*
* @note By default the writers will use
* "theInputConnection->getBoundingRect()" if theAreaOfInterest has nans.
*/
virtual void setAreaOfInterest(const ossimIrect& areaOfInterest);
/**
* @returns theAreaOfInterest.
*/
virtual ossimIrect getAreaOfInterest() const;
/**
* void getMetadatatypeList(std::vector<ossimString>& metadatatypeList)const
*
* pure virtual
*
* Appends the writers metadata types to the "metadatatypeList".
*
* This is the actual image type name. So for
* example, ossimTiffWorldFileWriter has tiff_world_file type.
*
* @param metadatatypeList stl::vector<ossimString> list to append to.
*
* @note All writers should append to the list, not, clear it and then add
* their types.
*/
virtual void getMetadatatypeList(
std::vector<ossimString>& metadatatypeList)const=0;
/**
* bool hasMetadataType(const ossimString& metadataType) const
*
* @param imageType string representing image type.
*
* @return true if "metadataType" is supported by writer.
*/
virtual bool hasMetadataType(const ossimString& metadataType)const=0;
/*!
* property interface
*/
virtual void setProperty(ossimRefPtr<ossimProperty> property);
virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
protected:
/**
* Write out the file.
* @return true on success, false on error.
*/
virtual bool writeFile() = 0;
ossimImageSource* theInputConnection;
ossimFilename theFilename;
ossimPixelType thePixelType;
ossimIrect theAreaOfInterest;
TYPE_DATA
};
#endif /* End of #ifndef ossimMetadataFileWriter_H */
|