Commit d99114d1 authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Corection streaming pour image non streamée.

parent 204b2ce0
......@@ -461,16 +461,6 @@ StreamingImageFileWriter<TInputImage>
/** End of Prepare ImageIO : create ImageFactory */
/** Control if the ImageIO is CanStreamWrite */
if( m_ImageIO->CanStreamWrite() == false )
{
itk::OStringStream msg;
msg << "The ImageFactory selected for the this image file <"<<m_FileName.c_str()<<"> is not StreamWrite "<< std::endl;
msg << m_ImageIO<< std::endl;
itkExceptionMacro(<<msg.str().c_str());
}
/**
* Grab the input
*/
......@@ -484,11 +474,20 @@ StreamingImageFileWriter<TInputImage>
*/
unsigned int numDivisions, numDivisionsFromSplitter;
numDivisions = static_cast<unsigned int>(CalculateNumberOfStreamDivisions());
numDivisionsFromSplitter = m_RegionSplitter->GetNumberOfSplits(outputRegion, numDivisions);
if (numDivisionsFromSplitter < numDivisions)
/** Control if the ImageIO is CanStreamWrite */
if( m_ImageIO->CanStreamWrite() == false )
{
otbMsgDebugMacro(<<"WARNING : The ImageFactory selected for the this image file <"<<m_FileName.c_str()<<"> is not StreamWrite. So, the streaming method is not use.");
numDivisions = 1;
}
else
{
numDivisions = numDivisionsFromSplitter;
numDivisions = static_cast<unsigned int>(CalculateNumberOfStreamDivisions());
numDivisionsFromSplitter = m_RegionSplitter->GetNumberOfSplits(outputRegion, numDivisions);
if (numDivisionsFromSplitter < numDivisions)
{
numDivisions = numDivisionsFromSplitter;
}
}
/**
......@@ -499,12 +498,6 @@ StreamingImageFileWriter<TInputImage>
streamRegion = m_RegionSplitter->GetSplit(0, numDivisions,
outputRegion);
// Allocation du bandeau
// outputPtr->SetBufferedRegion( streamRegion );
// outputPtr->Allocate();
// On s'appuie sur 'outputPtr' pour d�terminer les initialiser le 'm_ImageIO'
// Setup the ImageIO
//
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment