47 theProductProjection(0),
51 theBuildThumbnailFlag(false),
52 theThumbnailSize(0, 0),
53 theNumberOfTilesToBuffer(2),
55 theTilingEnabled(false),
56 theProgressFlag(
true),
85 const char* lookup =
theKwl.
find(
"igen.output_progress");
92 const char* thumbnailStr =
theKwl.
find(
"igen.thumbnail");
96 <<
"Thumbnail string = " <<
ossimString(thumbnailStr) << std::endl;
104 <<
"Generate thumbnail attribute is set to " 109 const char* resStr =
theKwl.
find(
"igen.thumbnail_res");
145 const char* numberOfSlaveTileBuffersStr =
theKwl.
find(
"igen.slave_tile_buffers");
146 if(numberOfSlaveTileBuffersStr)
151 const char* tilingKw =
theKwl.
find(
"igen.tiling.type");
167 int numberOfTimes = 0;
169 memset((
void *)&
status, 0,
sizeof(MPI_Status));
173 MPI_Recv(&stringSize,
181 if(
status.MPI_ERROR != MPI_SUCCESS)
186 <<
"Had errors receiving!!!!" << std::endl;
190 char* buf =
new char[stringSize+1];
194 memset((
void *)&
status, 0,
sizeof(MPI_Status));
205 if(
status.MPI_ERROR != MPI_SUCCESS)
209 <<
"Had errors receiving in ossimIgen::slaveCreate(!!!!" 213 buf[stringSize] =
'\0';
215 if(
status.MPI_ERROR != MPI_SUCCESS)
219 <<
"Had errors receiving!!!!" << std::endl;
227 kwlStream << buf << ends;
263 <<
"The igen kewyord list ==== \n" <<
theKwl << std::endl;
283 for(
long processor = 1;
299 MPI_Send((
void*)kwlString.
c_str(),
314 const char* MODULE =
"ossimIgen::loadProductSpec";
315 if(traceDebug())
CLOG <<
"entered..." << std::endl;
343 if ( writer.
valid() )
351 <<
" -- No processing chain defined for generating product." << std::endl;
361 const char* lookup =
theKwl.
find(
"igen.write_to_stdout");
378 std::string err =
"ossimIgen::outputProduct() ERROR: No product processing chain has yet" 379 " been established. Nothing to output!";
384 std::string err =
"ossimIgen::outputProduct() ERROR: No product projection has yet" 385 " been established. Nothing to output!";
415 if (!sequencer.
valid())
432 if ( !writer.
valid() )
435 std::string err =
"ossimIgen::outputProduct() ERROR: No image writer object was found in " 436 " processing chain.";
450 std::string err =
"ERROR: The write to standard out flag is set; however, writer does " 451 "not support going to standard out. Bummer...";
482 if(!tempFile.
isDir())
484 tempFile = tempFile.
path();
515 if (tilingPoly != NULL)
575 double jgttpj = jgtt/num_threads;
576 cout<<setprecision(3)<<endl;
577 cout <<
"Multi-threading metrics ---"<<endl;
578 cout <<
" Number of threads: " << num_threads<< endl;
581 cout <<
" Time waiting on jobs: "<<mts->
d_idleTime2<<
" s"<<endl;
582 cout <<
" Time waiting on cache: "<<mts->
d_idleTime5<<
" s"<<endl;
584 cout <<
" Job getTile T: "<<jgtt<<
" s"<<endl;
585 cout <<
" Average getTile T/job: "<<jgttpj<<
" s\n"<<endl;
625 <<
"ossimIgen::outputProduct ERROR:\n" 626 <<
"Caught exception!\n" 634 <<
"ossimIgen::outputProduct ERROR:\n" 635 <<
"Unknown exception caught!\n" 710 if ( (lr.
x - ul.
x + 1) > thumb_size)
712 lr.
x = ul.
x + thumb_size - 1;
714 if ( (lr.
y - ul.
y + 1) > thumb_size )
716 lr.
y = ul.
y + thumb_size - 1;
void setRectangle(const ossimIrect &rect)
const ossimKeywordlist & preferencesKWL() const
virtual ossimObject * dup() const =0
ossim_uint32 getNumberOfThreads() const
Fetches the number of threads being used. Useful when this object decides the quantity.
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
ossim_float64 width() const
virtual void disconnect(ossimConnectableObject *object=0)
Will disconnect the object passed in.
Represents serializable keyword/value map.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
ossimRefPtr< ossimGeoPolyCutter > & getExteriorCut()
ossimRefPtr< ossimGeoPolyCutter > & getInteriorCut()
const char * find(const char *key) const
virtual bool addListener(ossimListener *listener)
Overrides base "addListener" this will capture the pointer and then call the base class "addListener"...
bool writeToFile(ossimImageFileWriter *writer)
Consolidates job of actually writing to the output file.
const ossimDpt & ul() const
virtual void initialize()
static ossimString toString(bool aValue)
Numeric to string methods.
bool hasExteriorCut() const
return true if exterior cut is initialized.
bool initialize(const ossimMapProjection &proj, const ossimIrect &boundingRect)
ossim_uint32 d_maxCacheUsed
ossimRefPtr< ossimConnectableContainer > theContainer
Pure virtual base class for image file writers.
void setImageSize(const ossimIpt &size)
virtual bool write(const char *file, const char *comment=0) const
Methods to dump the ossimKeywordlist to a file on disk.
virtual bool setOutputStream(ossimRefPtr< ossimOStream > stream)
Sets the output stream to write to.
virtual void applyScale(const ossimDpt &scale, bool recenterTiePoint)
Applies scale to theDeltaLonPerPixel, theDeltaLatPerPixel and theMetersPerPixel data members (eg: the...
bool theBuildThumbnailFlag
ossimRefPtr< ossimMapProjection > theProductProjection
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
ossimRefPtr< ossimImageChain > theProductChain
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
virtual void accept(ossimVisitor &visitor)
We will add a visitor interface for all connectable objects.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossim_uint32 d_cacheEmptyCount
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
ossim_uint32 theThreadCount
virtual const char * what() const
Returns the error message.
std::string::size_type size() const
bool toBool() const
String to numeric methods.
virtual void initialize(const ossimKeywordlist &kwl)
ossimRefPtr< ossimTiling > theTiling
unsigned int ossim_uint32
#define STATIC_TYPE_INFO(T)
void setTypeName(const ossimString &typeName)
void initializeAttributes()
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.
virtual void writeToStream(std::ostream &out) const
ossim_float64 height() const
static ossimPreferences * instance()
ossimIpt theThumbnailSize
long theNumberOfTilesToBuffer
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
int getNumberOfProcessors() const
static ossimProjectionFactoryRegistry * instance()
void addPrefixToAll(const ossimString &prefix)
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
Will pass this call to the head of the list.
virtual void setFilename(const ossimFilename &file)
long toLong() const
toLong's deprecated, please use the toInts...
virtual const ossimFilename & getFilename() const
T * getObjectAs(ossim_uint32 idx=0)
void initThumbnailProjection()
Modifies the production chain to output redused-resolution thumbnail image.
void setView()
Initializes all clients of the view projection to the current product projection. ...
This class manages the sequencing of tile requests across multiple threads.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual void initialize()
Initialize method.
void addPreferences(const ossimKeywordlist &kwl, const char *prefix=0, bool stripPrefix=true)
virtual bool setView(ossimObject *baseObject)=0
virtual void setAreaOfInterest(const ossimIrect &inputRect)
virtual bool parseStream(ossim::istream &is, bool ignoreBinaryChars)
deprecated method
ossimFilename dirCat(const ossimFilename &file) const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
virtual void changeSequencer(ossimImageSourceSequencer *sequencer)
Sets the sequencer and connects it to the input of this.
bool isFeatureBoundingIntersect() const
std::basic_istringstream< char > istringstream
Class for char input memory streams.
bool next(ossimRefPtr< ossimMapProjection > &resultProjection, ossimIrect &resultingBounds, ossimString &resultingName) const
ossimFilename & setExtension(const ossimString &e)
Sets the extension of a file name.
virtual bool removeListener(ossimListener *listener)
Overrides base "removeListener".
virtual bool fillContainer(ossimConnectableContainer &container)
Inserts this object and all of its children and inputs into the container provided.
const ossimDpt & lr() const
static ossimMpi * instance()
ossimFilename path() const
virtual void outputProduct()
Writes the output product image. Throws an ossimException if error encountered.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual bool execute()
Calls: writeFile() writeMetaDataFiles()
bool addFirst(ossimConnectableObject *obj)
Adds it to the start of the chain.
bool hasInteriorCut() const
return true if interior cut is initialized.
virtual void accept(ossimVisitor &visitor)
We will add a visitor interface for all connectable objects.