X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmPixelReadConvert.cxx;h=54f8310ac323c6ac2bc00cdb8c041de673c77d1f;hb=4f3b36b1db085e9be749d2cababa274d1e76b68d;hp=c20ab64c1992e6182fbb0d67833efcf9cf6c3503;hpb=197dc522382e753249bcb2a75e22f61bd6d589b4;p=gdcm.git diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index c20ab64c..54f8310a 100644 --- a/src/gdcmPixelReadConvert.cxx +++ b/src/gdcmPixelReadConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.cxx,v $ Language: C++ - Date: $Date: 2005/10/28 16:12:51 $ - Version: $Revision: 1.95 $ + Date: $Date: 2005/11/10 13:39:55 $ + Version: $Revision: 1.101 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -31,7 +31,7 @@ namespace gdcm { -//bool ReadMPEGFile (std::ifstream *fp, void *image_buffer, size_t lenght); +//bool ReadMPEGFile (std::ifstream *fp, char *inputdata, size_t lenght); bool gdcm_read_JPEG2000_file (void* raw, char *inputdata, size_t inputlength); //----------------------------------------------------------------------------- @@ -301,7 +301,7 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp ) //gdcmWarningMacro( "Sorry, MPEG not yet taken into account" ); //return false; // fp has already been seek to start of mpeg - //ReadMPEGFile(fp, Raw, PixelDataLength); + //ReadMPEGFile(fp, (char*)Raw, PixelDataLength); return true; } else @@ -309,7 +309,8 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp ) // Default case concerns JPEG family if ( ! ReadAndDecompressJPEGFile( fp ) ) { - gdcmWarningMacro( "JPEG decompressor failed." ); + gdcmWarningMacro( "JPEG decompressor ( ReadAndDecompressJPEGFile()" + << " method ) failed." ); return false; } } @@ -366,7 +367,7 @@ bool PixelReadConvert::BuildRGBImage() return false; } - gdcmWarningMacro( "--> BuildRGBImage" ); + gdcmDebugMacro( "--> BuildRGBImage" ); // Build RGB Pixels AllocateRGB(); @@ -493,6 +494,7 @@ bool PixelReadConvert::ReadAndDecompressJPEGFile( std::ifstream *fp ) return true; } // wow what happen, must be an error + gdcmWarningMacro( "gdcm_read_JPEG2000_file() failed "); return false; } else if ( IsJPEGLS ) @@ -636,11 +638,11 @@ void PixelReadConvert::BuildLUTRGBA() gdcmWarningMacro( "Wrong Blue LUT descriptor" ); } - gdcmWarningMacro(" lengthR " << lengthR << " debR " + gdcmDebugMacro(" lengthR " << lengthR << " debR " << debR << " nbitsR " << nbitsR); - gdcmWarningMacro(" lengthG " << lengthG << " debG " + gdcmDebugMacro(" lengthG " << lengthG << " debG " << debG << " nbitsG " << nbitsG); - gdcmWarningMacro(" lengthB " << lengthB << " debB " + gdcmDebugMacro(" lengthB " << lengthB << " debB " << debB << " nbitsB " << nbitsB); if ( !lengthR ) // if = 2^16, this shall be 0 see : CP-143 @@ -826,8 +828,6 @@ void PixelReadConvert::ConvertSwapZone() // 'ImplicitVR BigEndian PrivateGE Transfer Syntax', then GDCM needs to switch // the byte swapping code when entering the pixel data. -/* //Let me check something. - //I wait for the Dashboard ! if ( IsPrivateGETransferSyntax ) { // PrivateGETransferSyntax only exists for 'true' Dicom images @@ -842,7 +842,7 @@ void PixelReadConvert::ConvertSwapZone() break; } } -*/ + if ( BitsAllocated == 16 ) { uint16_t *im16 = (uint16_t*)Raw; @@ -1258,13 +1258,13 @@ void PixelReadConvert::ConvertHandleColor() if ( IsYBRFull ) { // [Planar 1] AND [Photo C] (remember YBR_FULL_422 acts as RGB) - gdcmWarningMacro("--> YBRFull"); + gdcmDebugMacro("--> YBRFull"); ConvertYcBcRPlanesToRGBPixels(); } else { // [Planar 1] AND [Photo C] - gdcmWarningMacro("--> YBRFull"); + gdcmDebugMacro("--> YBRFull"); ConvertRGBPlanesToRGBPixels(); } return; @@ -1275,7 +1275,7 @@ void PixelReadConvert::ConvertHandleColor() if (IsRLELossless) { - gdcmWarningMacro("--> RLE Lossless"); + gdcmDebugMacro("--> RLE Lossless"); ConvertRGBPlanesToRGBPixels(); }