OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimIgen.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 //
7 // Description: implementation for image generator
8 //
9 //*************************************************************************
10 // $Id: ossimIgen.cpp 22299 2013-07-02 19:28:28Z dburken $
11 
12 #include <ossim/ossimConfig.h> /* To pick up define OSSIM_HAS_MPI. */
13 
14 #if OSSIM_HAS_MPI
15 # include <mpi.h>
18 #endif
19 
23 #include <ossim/base/ossimTrace.h>
37 #include <ossim/parallel/ossimMtDebug.h> //### For debug/performance eval
38 #include <iterator>
39 #include <sstream>
40 
41 static ossimTrace traceDebug(ossimString("ossimIgen:debug"));
42 static ossimTrace traceLog(ossimString("ossimIgen:log"));
43 
45 :
46 theContainer(new ossimConnectableContainer()),
47 theProductProjection(0),
48 theProductChain(0),
49 theTiling(new ossimTiling),
50 theOutputRect(),
51 theBuildThumbnailFlag(false),
52 theThumbnailSize(0, 0),
53 theNumberOfTilesToBuffer(2),
54 theKwl(),
55 theTilingEnabled(false),
56 theProgressFlag(true),
57 theStdoutFlag(false),
58 theThreadCount(9999) // Default no threading
59 {
61 }
62 
64 {
66  theTiling = 0;
69  theContainer = 0;
70 }
71 
73 {
74  theBuildThumbnailFlag = false;
76  theTilingEnabled = false;
77 
78  if(ossimMpi::instance()->getRank() != 0)
79  {
81  "preferences.",
82  true);
83  }
84 
85  const char* lookup = theKwl.find("igen.output_progress");
86  if (lookup)
87  {
88  ossimString os = lookup;
89  theProgressFlag = os.toBool();
90  }
91 
92  const char* thumbnailStr = theKwl.find("igen.thumbnail");
93  if(traceDebug())
94  {
96  << "Thumbnail string = " << ossimString(thumbnailStr) << std::endl;
97  }
98  if(thumbnailStr)
99  {
100  theBuildThumbnailFlag= ossimString(thumbnailStr).toBool();
101  if(traceDebug())
102  {
104  << "Generate thumbnail attribute is set to "
105  << theBuildThumbnailFlag << std::endl;
106  }
108  {
109  const char* resStr = theKwl.find("igen.thumbnail_res");
110  if(resStr)
111  {
112  theThumbnailSize = ossimIpt(0,0);
113  std::istringstream in(resStr);
114  ossimString x,y;
115 
116  in >> x >> y;
117 
118  ossim_int32 ix = x.toInt32();
119  ossim_int32 iy = y.toInt32();
120 
121  if (ix > 0)
122  {
123  theThumbnailSize.x = ix;
124  }
125  else
126  {
127  theThumbnailSize.x = 128;
128  }
129 
130  if (iy > 0)
131  {
132  theThumbnailSize.y = iy;
133  }
134  else
135  {
137  }
138  }
139  else
140  {
141  theThumbnailSize = ossimIpt(128, 128);
142  }
143  }
144  }
145  const char* numberOfSlaveTileBuffersStr = theKwl.find("igen.slave_tile_buffers");
146  if(numberOfSlaveTileBuffersStr)
147  {
148  theNumberOfTilesToBuffer = ossimString(numberOfSlaveTileBuffersStr).toLong();
149  }
150 
151  const char* tilingKw = theKwl.find("igen.tiling.type");
152  if(tilingKw)
153  {
154  theTilingEnabled = true;
155  if(!theTiling->loadState(theKwl, "igen.tiling."))
156  {
157  theTilingEnabled = false;
158  }
159  }
160 }
161 
163 {
164 #if OSSIM_HAS_MPI
165  int stringSize;
166  MPI_Status status;
167  int numberOfTimes = 0;
168 
169  memset((void *)&status, 0, sizeof(MPI_Status));
170 
171 
172  // we first need to receive the size of the keyword list to load
173  MPI_Recv(&stringSize,
174  1,
175  MPI_INT,
176  0, // source
177  0, // tag
178  MPI_COMM_WORLD,
179  &status);
180 
181  if(status.MPI_ERROR != MPI_SUCCESS)
182  {
184  << "SLAVE = "
186  << "Had errors receiving!!!!" << std::endl;
187  return;
188  }
189 
190  char* buf = new char[stringSize+1];
191 
192  numberOfTimes = 0;
193 
194  memset((void *)&status, 0, sizeof(MPI_Status));
195 
196  // now lets get the keywordlist as a string so we can load it up
197  MPI_Recv(buf,
198  stringSize,
199  MPI_CHAR,
200  0, // source
201  0, // tag
202  MPI_COMM_WORLD,
203  &status);
204 
205  if(status.MPI_ERROR != MPI_SUCCESS)
206  {
208  << "SLAVE = " << ossimMpi::instance()->getRank()
209  << "Had errors receiving in ossimIgen::slaveCreate(!!!!"
210  << std::endl;
211  return;
212  }
213  buf[stringSize] = '\0';
214 
215  if(status.MPI_ERROR != MPI_SUCCESS)
216  {
218  << "SLAVE = " << ossimMpi::instance()->getRank()
219  << "Had errors receiving!!!!" << std::endl;
220  return;
221  }
222 
223  // now lets convert the received keywordlist into an actual
224  // ossimKeywordlist by using the parsStream method.
225  std::ostringstream kwlStream;
226 
227  kwlStream << buf << ends;
228 
229  istringstream kwlInStream(kwlStream.str());
230  theKwl.clear();
231  theKwl.parseStream(kwlInStream);
233  delete [] buf;
234  buf = 0;
235 
236  if(traceDebug())
237  {
238  ossimNotify(ossimNotifyLevel_DEBUG) << "****************** KWL ************************" << std::endl;
239  ossimNotify(ossimNotifyLevel_DEBUG) << theKwl << std::endl;
240  ossimNotify(ossimNotifyLevel_DEBUG) << "**************** END KWL ************************" << std::endl;
241 
242  }
243  loadProductSpec();
244 #endif
245 }
246 
248 {
249 #if OSSIM_HAS_MPI
250  if(ossimMpi::instance()->getNumberOfProcessors() > 0)
251  {
252  if(ossimMpi::instance()->getRank() != 0)
253  {
254  slaveSetup();
255  return;
256  }
257  }
258 #endif
259  theKwl = kwl;
260  if(traceDebug())
261  {
263  << "The igen kewyord list ==== \n" << theKwl << std::endl;
264  }
266 
267  kwlPrefs.addPrefixToAll("preferences.");
268  theKwl.add(kwlPrefs);
269 
271 
272  // now stream it to all slave processors
273  //
274 #if OSSIM_HAS_MPI
275  if(ossimMpi::instance()->getNumberOfProcessors() > 0)
276  {
277  std::ostringstream outputKeywordlist;
278 
279  theKwl.writeToStream(outputKeywordlist);
280  ossimString kwlString = outputKeywordlist.str();
281  ossim_uint32 size = kwlString.size();
282 
283  for(long processor = 1;
284  processor < ossimMpi::instance()->getNumberOfProcessors();
285  ++processor)
286  {
287  // let's send the keywordlist argument.
288  // This is two steps. We send a message to
289  // indicate the size and then we send the
290  // string.
291  //
292  MPI_Send(&size,
293  1,
294  MPI_INT,
295  processor,
296  0,
297  MPI_COMM_WORLD);
298 
299  MPI_Send((void*)kwlString.c_str(),
300  size,
301  MPI_CHAR,
302  processor,
303  0,
304  MPI_COMM_WORLD);
305  }
306  }
307 #endif
308  loadProductSpec();
309 
310 }
311 
313 {
314  const char* MODULE = "ossimIgen::loadProductSpec";
315  if(traceDebug()) CLOG << "entered..." << std::endl;
316 
317  // Clear out the overall container and initialize it with spec in KWL:
320 
321  // There should be a product chain defined in the container:
322  // ossimConnectableObject* obj =
323  // theContainer->findFirstObjectOfType(STATIC_TYPE_NAME(ossimImageChain), false);
324  // theProductChain = PTR_CAST(ossimImageChain, obj);
325 
326  ossimTypeNameVisitor visitor( ossimString("ossimImageChain"),
327  true, // firstofTypeFlag
330  theContainer->accept( visitor );
332 
333  if (!theProductChain.valid())
334  {
335  // Search for a connectable container specified that contains the entire product chain:
336  // ossimConnectableObject* obj2 =
337  // theContainer->findFirstObjectOfType(STATIC_TYPE_NAME(ossimImageFileWriter), true);
338  // ossimImageFileWriter* writer = PTR_CAST(ossimImageFileWriter, obj2);
339  visitor.reset();
340  visitor.setTypeName( ossimString( "ossimImageFileWriter" ) );
341  theContainer->accept( visitor );
343  if ( writer.valid() )
344  {
345  theProductChain = dynamic_cast<ossimImageChain*>( writer->getInput() );
346  }
347 
348  if (!theProductChain.valid())
349  {
351  << " -- No processing chain defined for generating product." << std::endl;
352  return false;
353  }
354  }
355 
356  // The output projection is specified separately in the KWL:
357  ossimString prefix = "product.projection.";
358  theProductProjection = dynamic_cast<ossimMapProjection*>(
360 
361  const char* lookup = theKwl.find("igen.write_to_stdout");
362  if (lookup && ossimString(lookup).toBool())
363  {
364  theStdoutFlag = true;
365  }
366 
367  return true;
368 }
369 
370 //*************************************************************************************************
372 //*************************************************************************************************
374 {
375  // Verify that all vitals have been initialized:
376  if (!theProductChain.valid())
377  {
378  std::string err = "ossimIgen::outputProduct() ERROR: No product processing chain has yet"
379  " been established. Nothing to output!";
380  throw(ossimException(err));
381  }
383  {
384  std::string err = "ossimIgen::outputProduct() ERROR: No product projection has yet"
385  " been established. Nothing to output!";
386  throw(ossimException(err));
387  }
388 
389  // Update the chain with the product view specified:
390  setView();
391  initializeChain();
392 
393  // if it's a thumbnail then adjust the GSD and reset the view proj to the chain.
396 
398 
399 #if OSSIM_HAS_MPI
400  // only allocate the slave connection if the number of processors is larger than 1
401  if(ossimMpi::instance()->getNumberOfProcessors() > 1)
402  {
403  if(ossimMpi::instance()->getRank()!=0)
405  else
406  sequencer = new ossimImageMpiMWriterSequenceConnection();
407  }
408 #endif
409 
410  // we will just load a serial connection if MPI is not supported.
411  // Threading?
412  if (!sequencer.valid() && (theThreadCount != 9999))
413  sequencer = new ossimMultiThreadSequencer(0, theThreadCount);
414 
415  if (!sequencer.valid())
416  sequencer = new ossimImageSourceSequencer(0);
417 
418 
419  // Look for the first writer (should be the only writer) in our list of objects:
420 
421  // ossimRefPtr<ossimImageFileWriter> writer = 0;
422  // ossimConnectableObject::ConnectableObjectList imageWriters =
423  // theContainer->findAllObjectsOfType(STATIC_TYPE_INFO(ossimImageFileWriter), false);
424 
425  ossimTypeNameVisitor visitor( ossimString("ossimImageFileWriter"),
426  true, // firstofTypeFlag
429  theContainer->accept( visitor );
431 
432  if ( !writer.valid() )
433  {
434  sequencer = 0;
435  std::string err = "ossimIgen::outputProduct() ERROR: No image writer object was found in "
436  " processing chain.";
437  throw(ossimException(err));
438  }
439 
440  // writer = PTR_CAST(ossimImageFileWriter, imageWriters[0].get());
441  writer->changeSequencer(sequencer.get());
443 
444  // Check for writing to standard output flag. Not all writers support this so check and
445  // throw an error if not supported.
446  if (theStdoutFlag)
447  {
448  if ( writer->setOutputStream(std::cout) == false )
449  {
450  std::string err = "ERROR: The write to standard out flag is set; however, writer does "
451  "not support going to standard out. Bummer...";
452  throw(ossimException(err));
453  }
454  }
455 
456  writer->initialize();
457 
458  if ( theBuildThumbnailFlag )
459  {
460  //---
461  // Use theOutputRect as it has been clamped to be within the requested thumbnail size.
462  //
463  // Relying of the bounding rectangle of the scaled product chain has given us off by
464  // one rectangles, i.e., a width of 513 instead of 512.
465  //
466  // NOTE: This must be called after the writer->initialize() as
467  // ossimImageFileWriter::initialize incorrectly resets theAreaOfInterest
468  // back to the bounding rect.
469  //---
471  }
472 
473  // If multi-file tiled output is not desired perform simple output, handle special:
475  {
477 
478  ossimRectangleCutFilter* cut = 0;
479  ossimTilingPoly* tilingPoly = dynamic_cast<ossimTilingPoly*>( theTiling.get() );
480 
481  ossimFilename tempFile = writer->getFilename();
482  if(!tempFile.isDir())
483  {
484  tempFile = tempFile.path();
485  }
486 
487  ossimString tileName;
488  ossimIrect clipRect;
489 
490  // 'next' method modifies the mapProj which is the same instance as theProductProjection,
491  // so this data member is modified here, then later accessed by setView:
492  while(theTiling->next(theProductProjection, clipRect, tileName))
493  {
494  if ( !tilingPoly )//use ossimTiling or ossimTilingRect
495  {
496  // Disconnect prior to setting up chain.
497  writer->disconnect();
498 
499  // This will progate the updated projection from theTiling->next call.
500  setView();
501 
502  // Recompute the bounding rect:
503  initializeChain();
504 
505  // Hook writer up:
507  writer->setFilename(tempFile.dirCat(tileName));
508  writer->initialize();
509 
510  // Set the clip rect for tile:
511  writer->setAreaOfInterest( clipRect );
512  }
513  else //otherwise use ossimTilingPoly
514  {
515  if (tilingPoly != NULL)
516  {
517  if (!tilingPoly->isFeatureBoundingIntersect())//if clip rect does not intersect with output rect, do nothing
518  {
519  continue;
520  }
521  if (tilingPoly->useMbr())//if use_mbr flag is set to true, all pixels within the MBR will be preserved
522  {
523  if (cut == NULL)
524  {
525  cut = new ossimRectangleCutFilter;
527  }
528  setView();
529  cut->setRectangle(clipRect);
530  }
531  else
532  {
533  if ( tilingPoly->hasExteriorCut() )
534  {
535  theProductChain->addFirst( tilingPoly->getExteriorCut().get() );
536  }
537  if ( tilingPoly->hasInteriorCut() )
538  {
539  theProductChain->addFirst( tilingPoly->getInteriorCut().get() );
540  }
541  }
542  }
543 
544  initializeChain();
545  writer->disconnect();
547  writer->setFilename(tempFile.dirCat(tileName));
548  writer->initialize();
549 
550  } // if ( !tilingPoly ){} else{
551 
552 
553  // Write the file:
554  if ( !writeToFile( writer.get() ))
555  {
556  break;
557  }
558  }
559  }
560  else
561  {
562  // No multi-file tiling, just conventional write to single file:
563  writeToFile(writer.get());
564  }
565 
566  //########## DEBUG CODE FOR TIMING MULTI THREAD LOCKS ##############
567  if (sequencer.valid() && (theThreadCount != 9999))
568  {
569  ossimMultiThreadSequencer* mts = dynamic_cast<ossimMultiThreadSequencer*>(sequencer.get());
570  if (mts != NULL)
571  {
572 
573  double jgtt = mts->d_jobGetTileT;
574  ossim_uint32 num_threads = mts->getNumberOfThreads();
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;
579  cout << " Max cache used: "<< mts->d_maxCacheUsed << endl;
580  cout << " Cache emptied count: "<< ossimString::toString(mts->d_cacheEmptyCount) << endl;
581  cout << " Time waiting on jobs: "<<mts->d_idleTime2<<" s"<<endl;
582  cout << " Time waiting on cache: "<<mts->d_idleTime5<<" s"<<endl;
583  cout << " Handler getTile T: "<<mts->handlerGetTileT()<<" s"<<endl;
584  cout << " Job getTile T: "<<jgtt<<" s"<<endl;
585  cout << " Average getTile T/job: "<<jgttpj<<" s\n"<<endl;
586  }
587  }
588  //##################################################################
589 }
590 
591 //*************************************************************************************************
593 //*************************************************************************************************
595 {
596  ossimStdOutProgress* prog = 0;
597  if ( (ossimMpi::instance()->getRank() == 0) && theProgressFlag)
598  {
599  // Add a listener to master.
600  prog = new ossimStdOutProgress(0, true);
601  writer->addListener(prog);
602  }
603 
604  if (traceLog() && (ossimMpi::instance()->getRank() == 0))
605  {
606  ossimFilename logFile = writer->getFilename();
607  logFile.setExtension(ossimString("log"));
608 
610  writer->fillContainer(*container.get());
611  ossimKeywordlist logKwl;
612  container->saveState(logKwl);
613  logKwl.write(logFile.c_str());
614  }
615 
616  try
617  {
618  writer->execute();
619  }
620 
621  // Catch internal exceptions:
622  catch(const ossimException& e)
623  {
625  << "ossimIgen::outputProduct ERROR:\n"
626  << "Caught exception!\n"
627  << e.what()
628  << std::endl;
629  return false;
630  }
631  catch(...)
632  {
634  << "ossimIgen::outputProduct ERROR:\n"
635  << "Unknown exception caught!\n"
636  << std::endl;
637  return false;
638  }
639 
640  if (prog)
641  {
642  writer->removeListener(prog);
643  delete prog;
644  prog = 0;
645  }
646 
647  return true;
648 }
649 
650 //*************************************************************************************************
652 //*************************************************************************************************
654 {
656  {
657  // Find all view clients in the chain, and notify them of the new view:
658 #if 0
660  theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimViewInterface), true, true);
661  for(ossim_uint32 i = 0; i < clientList.size();++i)
662  {
663  ossimViewInterface* viewClient = dynamic_cast<ossimViewInterface*>( clientList[i].get() );
664  if (viewClient)
665  viewClient->setView(theProductProjection->dup());
666  }
667 #endif
668 
669  ossimTypeNameVisitor visitor( ossimString("ossimViewInterface"),
670  false, // firstofTypeFlag
673  theProductChain->accept( visitor );
674  for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
675  {
676  ossimViewInterface* viewClient = visitor.getObjectAs<ossimViewInterface>( i );
677  if (viewClient)
678  {
679  viewClient->setView( theProductProjection->dup() );
680  }
681  }
682 
683  // Force recompute of bounding rect:
684  initializeChain();
685  }
686 }
687 
688 //*************************************************************************************************
690 //*************************************************************************************************
692 {
693  double thumb_size = ossim::max(theThumbnailSize.x, theThumbnailSize.y);
694  ossimMapProjection* mapProj = dynamic_cast<ossimMapProjection*>(theProductProjection.get());
695 
696  if(mapProj && !theOutputRect.hasNans())
697  {
698  double xScale = theOutputRect.width() / thumb_size;
699  double yScale = theOutputRect.height() / thumb_size;
700  double scale = ossim::max(xScale, yScale);
701  mapProj->applyScale(ossimDpt(scale, scale), true);
702  }
703 
704  // Need to change the view in the product chain:
705  setView();
706 
707  // Clamp output rectangle to thumbnail bounds.
708  ossimDpt ul = theOutputRect.ul();
709  ossimDpt lr = theOutputRect.lr();
710  if ( (lr.x - ul.x + 1) > thumb_size)
711  {
712  lr.x = ul.x + thumb_size - 1;
713  }
714  if ( (lr.y - ul.y + 1) > thumb_size )
715  {
716  lr.y = ul.y + thumb_size - 1;
717  }
718  theOutputRect = ossimDrect(ul, lr);
719 }
720 
721 //*************************************************************************************************
722 // This method is called after a change is made to the product chain. It recomputes the bounding
723 // rectangle.
724 //*************************************************************************************************
726 {
727  // Force initialization of the chain to recompute parameters:
730 
731  if(!theOutputRect.hasNans())
732  {
733  // Stretch the rectangle out to integer boundaries.
735 
736  // Communicate the new product size to the view's geometry object. This is a total HACK that
737  // external code needs to worry about setting this. Something is wrong with this picture
738  // (OLK 02/11)
740  if (geom)
742  }
743 }
void setRectangle(const ossimIrect &rect)
void makeNan()
Definition: ossimDrect.h:388
ossim_uint32 x
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.
Definition: ossimIosFwd.h:35
T max(T a, T b)
Definition: ossimCommon.h:236
#define CLOG
Definition: ossimTrace.h:23
ossim_float64 width() const
Definition: ossimDrect.h:522
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...
ossim_uint32 y
ossimRefPtr< ossimGeoPolyCutter > & getExteriorCut()
bool valid() const
Definition: ossimRefPtr.h:75
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.
Definition: ossimIgen.cpp:594
const ossimDpt & ul() const
Definition: ossimDrect.h:339
bool useMbr() const
double y
Definition: ossimDpt.h:165
void initializeChain()
Definition: ossimIgen.cpp:725
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)
Definition: ossimTiling.cpp:48
ossimRefPtr< ossimConnectableContainer > theContainer
Definition: ossimIgen.h:55
Pure virtual base class for image file writers.
void setImageSize(const ossimIpt &size)
bool isDir() const
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
Definition: ossimIgen.h:60
ossimRefPtr< ossimMapProjection > theProductProjection
Definition: ossimIgen.h:56
bool theProgressFlag
Definition: ossimIgen.h:65
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
ossimRefPtr< ossimImageChain > theProductChain
Definition: ossimIgen.h:57
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)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
yy_size_t size
void slaveSetup()
Definition: ossimIgen.cpp:162
ossim_uint32 theThreadCount
Definition: ossimIgen.h:67
virtual const char * what() const
Returns the error message.
std::string::size_type size() const
Definition: ossimString.h:405
bool toBool() const
String to numeric methods.
virtual void initialize(const ossimKeywordlist &kwl)
Definition: ossimIgen.cpp:247
ossimRefPtr< ossimTiling > theTiling
Definition: ossimIgen.h:58
unsigned int ossim_uint32
#define STATIC_TYPE_INFO(T)
Definition: ossimRtti.h:319
void setTypeName(const ossimString &typeName)
void initializeAttributes()
Definition: ossimIgen.cpp:72
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
bool hasNans() const
Definition: ossimDrect.h:396
ossim_float64 height() const
Definition: ossimDrect.h:517
static ossimPreferences * instance()
ossimIpt theThumbnailSize
Definition: ossimIgen.h:61
long theNumberOfTilesToBuffer
Definition: ossimIgen.h:62
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
int getNumberOfProcessors() const
Definition: ossimMpi.cpp:154
bool loadProductSpec()
Definition: ossimIgen.cpp:312
virtual ~ossimIgen()
Definition: ossimIgen.cpp:63
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.
return status
virtual void setFilename(const ossimFilename &file)
ossimDrect theOutputRect
Definition: ossimIgen.h:59
long toLong() const
toLong&#39;s deprecated, please use the toInts...
virtual const ossimFilename & getFilename() const
T * getObjectAs(ossim_uint32 idx=0)
Definition: ossimVisitor.h:64
bool theTilingEnabled
Definition: ossimIgen.h:64
void initThumbnailProjection()
Modifies the production chain to output redused-resolution thumbnail image.
Definition: ossimIgen.cpp:691
int getRank() const
Definition: ossimMpi.cpp:140
void setView()
Initializes all clients of the view projection to the current product projection. ...
Definition: ossimIgen.cpp:653
This class manages the sequencing of tile requests across multiple threads.
ossimDpt size() const
Definition: ossimDrect.h:524
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual void initialize()
Initialize method.
ossim_int32 y
Definition: ossimIpt.h:142
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
double x
Definition: ossimDpt.h:164
ossimFilename dirCat(const ossimFilename &file) const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
virtual void changeSequencer(ossimImageSourceSequencer *sequencer)
Sets the sequencer and connects it to the input of this.
bool isFeatureBoundingIntersect() const
ossim_int32 x
Definition: ossimIpt.h:141
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
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
Definition: ossimDrect.h:341
static ossimMpi * instance()
Definition: ossimMpi.cpp:27
ossimFilename path() const
void stretchOut()
Definition: ossimDrect.cpp:379
virtual void outputProduct()
Writes the output product image. Throws an ossimException if error encountered.
Definition: ossimIgen.cpp:373
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.
int ossim_int32
virtual void accept(ossimVisitor &visitor)
We will add a visitor interface for all connectable objects.
bool theStdoutFlag
Definition: ossimIgen.h:66
ossimKeywordlist theKwl
Definition: ossimIgen.h:63