]> Creatis software - gdcm.git/blobdiff - src/gdcmHeader.cxx
* Adaptation for porting to VC++:
[gdcm.git] / src / gdcmHeader.cxx
index cd5785b1985683f6f2ba118bca6ccb133f12c9ba..2f5eac1c50b597a99987316e556c332413bf6613 100644 (file)
@@ -129,10 +129,10 @@ void gdcmHeader::CheckSwap()
        entCur = deb + 128;
        if(memcmp(entCur, "DICM", (size_t)4) == 0) {
                filetype = TrueDicom;
-               dbg.Verbose(0, "gdcmHeader::CheckSwap:", "looks like DICOM Version3");
+               dbg.Verbose(1, "gdcmHeader::CheckSwap:", "looks like DICOM Version3");
        } else {
                filetype = Unknown;
-               dbg.Verbose(0, "gdcmHeader::CheckSwap:", "not a DICOM Version3 file");
+               dbg.Verbose(1, "gdcmHeader::CheckSwap:", "not a DICOM Version3 file");
        }
 
        if(filetype == TrueDicom) {
@@ -302,11 +302,10 @@ void gdcmHeader::FindLength( ElValue * ElVal) {
        guint32 length32;
        guint16 length16;
        
-       string vr = ElVal->GetVR();
-       
-       if ( (filetype == ExplicitVR) && (vr != "Implicit") ) {
-               if (   ( vr == "OB" ) || ( vr == "OW" )
-                        || ( vr == "SQ" ) || ( vr == "UN" ) ) {
+       if (filetype == ExplicitVR) {
+               string vr = ElVal->GetVR();
+               if (   (vr != "Implicit")
+                        && ( (vr=="OB") || (vr=="OW") || (vr=="SQ") || (vr=="UN") ) ) {
                        
                        // The following two bytes are reserved, so we skip them,
                        // and we proceed on reading the length on 4 bytes.
@@ -488,7 +487,7 @@ ElValue * gdcmHeader::ReadNextElement(void) {
        // Find out if the tag we encountered is in the dictionaries:
        gdcmDictEntry * NewTag = IsInDicts(g, n);
        if (!NewTag)
-               NewTag = new gdcmDictEntry(g, n, "Unknown", "Unknown", "Unkown");
+               NewTag = new gdcmDictEntry(g, n, "Unknown", "Unknown", "Unknown");
 
        NewElVal = new ElValue(NewTag);
        if (!NewElVal) {