Program: gdcm
Module: $RCSfile: gdcmPixelReadConvert.cxx,v $
Language: C++
- Date: $Date: 2005/05/29 21:56:36 $
- Version: $Revision: 1.61 $
+ Date: $Date: 2005/05/30 00:24:10 $
+ Version: $Revision: 1.62 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
if ( IsJPEG2000 )
{
-// gdcmWarningMacro( "Sorry, JPEG2000 not yet taken into account" );
+ // I don't think we'll ever be able to deal with multiple fragments
+ assert( JPEGInfo->GetFragmentCount() == 1 );
fp->seekg( JPEGInfo->GetFirstFragment()->GetOffset(), std::ios::beg);
- if ( ! gdcm_read_JPEG2000_file( fp,Raw, JPEGInfo->GetFirstFragment()->GetLength() ) )
- return false;
+ if ( ! gdcm_read_JPEG2000_file( fp,Raw,
+ JPEGInfo->GetFirstFragment()->GetLength() ) )
+ {
+ return true;
+ }
}
if ( IsJPEGLS )
// if ( ! gdcm_read_JPEGLS_file( fp,Raw ) )
return false;
}
-
- // else ??
- // Precompute the offset localRaw will be shifted with
- int length = XSize * YSize * SamplesPerPixel;
- int numberBytes = BitsAllocated / 8;
-
- JPEGInfo->DecompressFromFile(fp, Raw, BitsStored, numberBytes, length );
- return true;
+ else
+ {
+ // Precompute the offset localRaw will be shifted with
+ int length = XSize * YSize * SamplesPerPixel;
+ int numberBytes = BitsAllocated / 8;
+
+ JPEGInfo->DecompressFromFile(fp, Raw, BitsStored, numberBytes, length );
+ return true;
+ }
}
/**