From: malaterre Date: Tue, 25 Oct 2005 18:14:49 +0000 (+0000) Subject: BUG: Ok I dont understand gdcm internals anymore. Whoever broke the writting process... X-Git-Tag: OpenJPEG.Version1.2~165 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ccdf70de6047db491a0e1b13c643063a9fda346a;p=gdcm.git BUG: Ok I dont understand gdcm internals anymore. Whoever broke the writting process should fix it. Add a barrier to never ever allow gdcm to read image without Transfer Syntax --- diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index 3c26ad67..071e72e3 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/25 17:54:55 $ - Version: $Revision: 1.87 $ + Date: $Date: 2005/10/25 18:14:49 $ + Version: $Revision: 1.88 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -116,7 +116,10 @@ void PixelReadConvert::GrabInformationsFromFile( File *file ) SwapCode = file->GetSwapCode(); std::string ts = file->GetTransferSyntax(); if ( ts == GDCM_UNKNOWN ) + { gdcmErrorMacro( "Could someone tell me how in the world could this happen !" ); + abort(); // DO NOT REMOVE. WE SHOULD NEVER READ SUCH IMAGE EVER (only gdcm can write such broekn dicom file) + } IsRaw = ( ! file->IsDicomV3() ) || Global::GetTS()->GetSpecialTransferSyntax(ts) == TS::ImplicitVRLittleEndian