From e56a3278e366ce6da347ebf1d8b0733a52a539a2 Mon Sep 17 00:00:00 2001 From: jpr Date: Wed, 14 Jan 2009 14:07:40 +0000 Subject: [PATCH] Deal with 'float' and 'double' Raw files. --- Example/RawToDicomStack.cxx | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/Example/RawToDicomStack.cxx b/Example/RawToDicomStack.cxx index 667589a5..70e0212d 100755 --- a/Example/RawToDicomStack.cxx +++ b/Example/RawToDicomStack.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: RawToDicomStack.cxx,v $ Language: C++ - Date: $Date: 2009/01/14 12:32:35 $ - Version: $Revision: 1.2 $ + Date: $Date: 2009/01/14 14:07:40 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -36,11 +36,14 @@ typedef short int * PS16; typedef unsigned short int * PU16; typedef int * PS32; typedef unsigned int * PU32; +typedef float * PF32; +typedef double * PD64; #define CRR(t1,t2) { for(int i=0;iread((char*)pixels, (size_t)dataSize); + Fp->read((char*)pixels, (size_t)dataSizeIn); if ( pixelSize !=1 && ( (l && bigEndian) || (b && ! bigEndian) ) ) { - ConvertSwapZone(pixelSize, pixels, dataSize); + ConvertSwapZone(pixelSize, pixels, dataSizeIn); } // iterate on the planes. @@ -319,6 +337,8 @@ int main(int argc, char *argv[]) case 16 : CFR(PS16); break; case -32 : CFR(PS32); break; case 32 : CFR(PU32); break; + case 33 : CFR(PF32); break; + case 64 : CFR(PD64); break; } // Create an empty FileHelper -- 2.45.0