]> Creatis software - gdcm.git/commitdiff
ENH: When using your fancy find/replace, try using your brain to understand other...
authormalaterre <malaterre>
Tue, 25 Oct 2005 15:28:49 +0000 (15:28 +0000)
committermalaterre <malaterre>
Tue, 25 Oct 2005 15:28:49 +0000 (15:28 +0000)
src/gdcmFile.cxx

index 88b7d144787810412af48e9abfc330af7eef79f1..9d435e133f60c9cc2783907bc7d676fbe47ea751 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/25 14:52:34 $
-  Version:   $Revision: 1.295 $
+  Date:      $Date: 2005/10/25 15:28:49 $
+  Version:   $Revision: 1.296 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -631,7 +631,10 @@ float File::GetXOrigin()
 
    if( entry->GetValueCount() == 3 )
    {
-      gdcmErrorMacro( entry->IsValueCountValid() );
+      if (!entry->IsValueCountValid() )
+      {
+         gdcmErrorMacro( "Invalid Value Count" );
+      }
       return (float)entry->GetValue(0);
    }
    return 0.0f;
@@ -659,7 +662,10 @@ float File::GetYOrigin()
 
    if( entry->GetValueCount() == 3 )
    {
-      gdcmErrorMacro( entry->IsValueCountValid() );
+      if (!entry->IsValueCountValid() )
+      {
+         gdcmErrorMacro( "Invalid Value Count" );
+      }
       return (float)entry->GetValue(1);
    }
    return 0.0f;
@@ -680,7 +686,10 @@ float File::GetZOrigin()
    {
       if( entry->GetValueCount() == 3 )
       {
-         gdcmErrorMacro( entry->IsValueCountValid() );
+         if (!entry->IsValueCountValid() )
+         {
+            gdcmErrorMacro( "Invalid Value Count" );
+         }
          return (float)entry->GetValue(2);
       }
       gdcmWarningMacro( "Wrong Image Position Patient (0020,0032)");
@@ -692,7 +701,10 @@ float File::GetZOrigin()
    {
       if( entry->GetValueCount() == 3 )
       {
-         gdcmErrorMacro( entry->IsValueCountValid() );
+         if (!entry->IsValueCountValid() )
+         {
+            gdcmErrorMacro( "Invalid Value Count" );
+         }
          return (float)entry->GetValue(2);
       }
       gdcmWarningMacro( "Wrong Image Position (RET) (0020,0030)");
@@ -705,7 +717,10 @@ float File::GetZOrigin()
    {
       if( entry->GetValueCount() == 1 )
       {
-         gdcmErrorMacro( entry->IsValueCountValid() );
+         if (!entry->IsValueCountValid() )
+         {
+            gdcmErrorMacro( "Invalid Value Count" );
+         }
          return (float)entry->GetValue(0); // VM=1 !
       }
       gdcmWarningMacro( "Wrong Slice Location (0020,1041)");
@@ -717,7 +732,10 @@ float File::GetZOrigin()
    {
       if( entry->GetValueCount() == 1 )
       {
-         gdcmErrorMacro( entry->IsValueCountValid() );
+         if (!entry->IsValueCountValid() )
+         {
+            gdcmErrorMacro( "Invalid Value Count" );
+         }
          return (float)entry->GetValue(0);
       }
       gdcmWarningMacro( "Wrong Location (0020,0050)");