From e045317452417dcb7d58ac263a3a6b2df3de849d Mon Sep 17 00:00:00 2001 From: malaterre Date: Tue, 11 Jan 2005 22:40:31 +0000 Subject: [PATCH] BUG: Remove left over from LibIDO. SwapCode = 12 / 21 don t exist anymore. Also remove SwapCode= 0 it doesnt mean anything replace by 1234 --- src/gdcmDocument.cxx | 20 ++++++++++---------- src/gdcmPixelReadConvert.cxx | 8 ++------ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 4c85abc8..9557f569 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2005/01/11 22:05:22 $ - Version: $Revision: 1.177 $ + Date: $Date: 2005/01/11 22:40:31 $ + Version: $Revision: 1.178 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -160,7 +160,7 @@ Document::Document() : ElementSet(-1) SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE); Initialise(); - SwapCode = 0; + SwapCode = 1234; Filetype = ExplicitVR; Group0002Parsed = false; } @@ -1010,7 +1010,7 @@ uint32_t Document::SwapLong(uint32_t a) { switch (SwapCode) { - case 0 : + case 1234 : break; case 4321 : a=( ((a<<24) & 0xff000000) | ((a<<8) & 0x00ff0000) | @@ -2164,7 +2164,7 @@ bool Document::CheckSwap() } else { - SwapCode = 0; + SwapCode = 1234; gdcmVerboseMacro( "HostByteOrder = NetworkByteOrder"); } @@ -2207,7 +2207,7 @@ bool Document::CheckSwap() Filetype = ACR; return true; case 0x00000004 : - SwapCode = 0; + SwapCode = 1234; Filetype = ACR; return true; default : @@ -2238,7 +2238,7 @@ bool Document::CheckSwap() case 0x0006 : case 0x0007 : case 0x0008 : - SwapCode = 0; + SwapCode = 1234; Filetype = ACR; return true; case 0x0100 : @@ -2259,7 +2259,7 @@ bool Document::CheckSwap() } // Then the only info we have is the net2host one. //if (! net2host ) - // SwapCode = 0; + // SwapCode = 1234; //else // SwapCode = 4321; //return; @@ -2274,13 +2274,13 @@ bool Document::CheckSwap() void Document::SwitchByteSwapCode() { gdcmVerboseMacro( "Switching Byte Swap code."); - if ( SwapCode == 0 ) + if ( SwapCode == 1234 ) { SwapCode = 4321; } else if ( SwapCode == 4321 ) { - SwapCode = 0; + SwapCode = 1234; } else if ( SwapCode == 3412 ) { diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index 17c28603..016d552c 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/01/11 16:44:43 $ - Version: $Revision: 1.21 $ + Date: $Date: 2005/01/11 22:40:32 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -319,11 +319,8 @@ void PixelReadConvert::ConvertSwapZone() uint16_t *im16 = (uint16_t*)Raw; switch( SwapCode ) { - case 0: - case 12: case 1234: break; - case 21: case 3412: case 2143: case 4321: @@ -344,7 +341,6 @@ void PixelReadConvert::ConvertSwapZone() uint32_t* im32 = (uint32_t*)Raw; switch ( SwapCode ) { - case 0: case 1234: break; case 4321: -- 2.48.1