]> Creatis software - gdcm.git/blobdiff - Testing/TestTS.cxx
* Activate Debug mode
[gdcm.git] / Testing / TestTS.cxx
index 70a5190dbacec1fcb0e83dac357990a01bb1cfdc..7b3c457c5a253236dd3e61ba52f9905095bcebee 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestTS.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 00:37:41 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
                                                                                 
 =========================================================================*/
 #include "gdcmTS.h"
+#include "gdcmGlobal.h"
 
 int TestTS(int , char *[])
 {
    gdcm::TS ts;
-   // There should be 150 entries
+   // There should be ~150 entries
    ts.Print( std::cout );
 
    // Implicit VR Little Endian
@@ -45,7 +46,8 @@ int TestTS(int , char *[])
    std::cout << ts.IsTransferSyntax( "1.2.840.10008.1.2.4.55" ) << std::endl;
    // JPEG Lossless, Non-Hierarchical (Process 14)
    std::cout << ts.IsTransferSyntax( "1.2.840.10008.1.2.4.57" ) << std::endl;
-   // JPEG Lossless, Hierarchical, First-Order Prediction (Process 14, [Selection Value 1])
+   // JPEG Lossless, Hierarchical, First-Order Prediction (Process 14, 
+   //               [Selection Value 1])
    std::cout << ts.IsTransferSyntax( "1.2.840.10008.1.2.4.70" ) << std::endl;
    // JPEG 2000 Lossless
    std::cout << ts.IsTransferSyntax( "1.2.840.10008.1.2.4.90" ) << std::endl;
@@ -56,5 +58,20 @@ int TestTS(int , char *[])
    // Unknown
    std::cout << ts.IsTransferSyntax( "Unknown Transfer Syntax" ) << std::endl;
 
+   // Test JPEG test:
+   std::cout << "Test TS:" << std::endl;
+   std::cout << ts.IsJPEGLossless( "1.2.840.10008.1.2.4.55") << std::endl;
+//if ( key == "1.2.840.10008.1.2.4.55"
+//  || key == "1.2.840.10008.1.2.4.57"
+//  || key == "1.2.840.10008.1.2.4.70" )
+   std::cout << ts.IsRLELossless( "1.2.840.10008.1.2.5") << std::endl;
+   std::cout << ts.IsJPEGLossless( "1.2.840.10008.1.2.5") << std::endl;
+   std::cout << ts.IsJPEG2000( "1.2.840.10008.1.2.5") << std::endl;
+   std::cout << ts.IsJPEG( "1.2.840.10008.1.2.5") << std::endl;
+   std::cout << ts.GetSpecialTransferSyntax( 
+                ts.GetSpecialTransferSyntax( "1.2.840.10008.1.2.5")) << std::endl;
+   std::cout << gdcm::Global::GetTS()->IsRLELossless( "1.2.840.10008.1.2.5" )  
+             << std::endl;
+
    return ts.GetValue( "" ) != gdcm::GDCM_UNFOUND;
 }