Ejemplo n.º 1
0
uint64 aces_formatter:: 
writeAllButScanlines ( const acesHeaderInfo & hi1, 
					  char * pOutputBuffer1, 
					  uint64 outputBufferSize1 ) 	
{
	hi					= hi1;
	pOutputBuffer		= pOutputBuffer1;
	outputBufferSize	= outputBufferSize1;
	
	getImageDimensions ();
	getSizes ();

	// write to file
	writeHeader ( hi, pOutputBuffer, outputBufferSize );
	
	// create line offset table, and write after header
		
	createLineOffsetTableAndOffsets ();
	
	writeLineOffsetTable ( LineOffsetTable );
	
	return endScanLineStoragePosition;
}
Ejemplo n.º 2
0
bool ossimMrSidReader::open()
{
   static const char MODULE[] = "ossimMrSidReader::open";

   if (traceDebug())
   {
      ossimNotify(ossimNotifyLevel_DEBUG)
         << MODULE << " entered...\n"
         << "image: " << theImageFile << "\n";
   }
   
   bool result = false;

   if(isOpen())
   {
      closeEntry();
   }

   LT_STATUS sts = LT_STS_Uninit;

   const LTFileSpec fileSpec(theImageFile.c_str());
 
   theReader = MrSIDImageReader::create();
   sts = theReader->initialize(fileSpec, true);
   if (LT_SUCCESS(sts) == false)
   {
      return false;
   }

   theImageNavigator = new LTINavigator(*theReader);

   theImageRect = ossimIrect(0, 0, theReader->getWidth()-1, theReader->getHeight()-1);
   theNumberOfBands = theReader->getNumBands();
   theMinDwtLevels = theReader->getNumLevels();

   getDataType();

   if (getImageDimensions(theMrSidDims))
   {
      if (theScalarType != OSSIM_SCALAR_UNKNOWN)
      {
         ossim_uint32 width  = theReader->getWidth();
         ossim_uint32 height = theReader->getHeight();

         // Check for zero width, height.
         if ( !width || !height )
         {
            ossimIpt tileSize;
            ossim::defaultTileSize(tileSize);

            width  = tileSize.x;
            height = tileSize.y;
         }

         theTile = ossimImageDataFactory::instance()->create(this, this);

         theTile->initialize();

         // Call the base complete open to pick up overviews.
         computeMinMax();
         completeOpen();

         result = true;
      }
   }

   if (result == false)
   {
      closeEntry();
   }

   if (traceDebug())
   {
      ossimNotify(ossimNotifyLevel_DEBUG)
         << MODULE << " exit status = " << (result?"true":"false\n")
         << std::endl;
   }

   return result;
}