]> Creatis software - gdcm.git/commitdiff
Some updates
authorjpr <jpr>
Tue, 26 Jun 2007 15:42:14 +0000 (15:42 +0000)
committerjpr <jpr>
Tue, 26 Jun 2007 15:42:14 +0000 (15:42 +0000)
Example/CMakeLists.txt
Example/DenseMultiFramesToDicom.cxx
Example/WriteDicomSimple.cxx

index 0a5ad0f933edfcdeb80914f15e2eb5a59dc34256..59317ac0e544e353a1c1449a732b9f7e3efc16a4 100644 (file)
@@ -4,57 +4,59 @@ INCLUDE_DIRECTORIES(
   ${GDCM_BINARY_DIR}  
   ${GDCM_BINARY_DIR}/src)
 SET(EXAMPLE_SOURCES
-#names starting with 'ex' are examples  
-#Txt2Mat  
-#exDicomRTStructSetFile  
-#exExtractCSA  
-exReadPapyrus  
-exReadWriteFile  
-exColorToRGB  
-exGrey2RGB  
-exGC  
-exImageLighten  
-#exInLine  
-exOverlaysACR  
-exOverlaysDCM  
-exCurveData  
-exExtractTag  
-exSerieHelper
-exXCoherentFileSet
-exExtractDicomTags  
-exMoveImagesToSingleSerieUID
-#the following are utilities  
-PrintDicomDir  
-PrintFile  
-MakeDicomDir  
-AnonymizeDicomDir     
-# without loading it as a gdcm::DicomDir  
-Anonymize             
-# for full gdcm readable files  
-AnonymizeNoLoad       
-# without loading the Pixel Data  
-AnonymizeMultiPatient 
-# without loading the Pixel Data  
-PatchHeader  
-ToInTag  
-#MagnetomVisionToBrucker     
-ReWrite  
-ReWriteExtended  
-RawToDicom  
-TestValidate  
-ToMRIregister  
-#BatchUncompress  
-ExtractOverlays   
-#the following will be transformed into 'examples', or 'utilities'
-#              or will be removed## Better you don't use them (not fully checked ...)   
-FindTags  
-FlatHashTablePrint  
-Volume2Dicom  
-WriteDicomSimple  
-WriteRead  
-#WriteDicomAsJPEG  
-exCTPET  
-#Slice
+  #names starting with 'ex' are examples  
+  #Txt2Mat  
+  #exDicomRTStructSetFile  
+  #exExtractCSA  
+  exReadPapyrus  
+  exReadWriteFile  
+  exColorToRGB  
+  exGrey2RGB  
+  exGC  
+  exImageLighten  
+  #exInLine  
+  exOverlaysACR  
+  exOverlaysDCM  
+  exCurveData  
+  exExtractTag  
+  exSerieHelper
+  exXCoherentFileSet
+  exExtractDicomTags  
+  exMoveImagesToSingleSerieUID
+  #the following are utilities  
+  PrintDicomDir  
+  PrintFile  
+  MakeDicomDir  
+  AnonymizeDicomDir     
+  # without loading it as a gdcm::DicomDir  
+  Anonymize             
+  # for full gdcm readable files  
+  AnonymizeNoLoad       
+  # without loading the Pixel Data  
+  AnonymizeMultiPatient 
+  # without loading the Pixel Data  
+  PatchHeader  
+  ToInTag  
+  ReWrite  
+  ReWriteExtended  
+  RawToDicom  
+  TestValidate  
+  ToMRIregister
+  DenseMultiFramesToDicom
+    
+  #BatchUncompress  
+  ExtractOverlays   
+  #the following will be transformed into 'examples', or 'utilities'
+  #              or will be removed
+  # Better you don't use them (not fully checked ...)   
+  FindTags  
+  FlatHashTablePrint  
+  Volume2Dicom  
+  WriteDicomSimple  
+  WriteRead  
+  #WriteDicomAsJPEG  
+  exCTPET  
+  #Slice
 )
 
 FOREACH(name ${EXAMPLE_SOURCES})  
index 48a74617dac09a7e04cf99297fc17a7536addbf0..cba55e5bab2be4089d5468f7ff67027d80b039b2 100755 (executable)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: DenseMultiFramesToDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/06/21 15:06:12 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2007/06/26 15:42:14 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -93,7 +93,7 @@ The terms brightness and contrast are not used in radiology imaging
 int main(int argc, char *argv[])
 {
    START_USAGE(usage)
-   " \n DenseMultiFramessToDicom :                                          \n",
+   " \n DenseMultiFramesToDicom :                                           \n",
    " - explores recursively the given (single Patient, single Study) directory",
    "         - examines the '.txt' files                                      ",
    "         - Converts the files into 16 bits Dicom files,                   ",
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
    "              [studyUID = ] [patName = ]                                  ",
    "              [listonly] [verbose] [debug]                                ",
    "                                                                          ",
-   "studyUID   : *aware* user wants to add the serie                          ",
+   " studyUID   : *aware* user wants to add the serie                         ",
    "                                             to an already existing study ",
    " verbose  : user wants to run the program in 'verbose mode'               ",
    " debug    : *developer*  wants to run the program in 'debug mode'         ",
@@ -306,6 +306,7 @@ All pixels with zero strain values are outside the masks.
     }        
              
   //float *f = new float(nx*ny);
+  // -->float *f = new float[nx*ny]; // Would be better !
    float *f = (float *) malloc(nx*ny*nf*sizeof(float));
   // float mini = FLT_MAX, maxi = FLT_MIN;
    float val;
index d294697835f7b8c4127339c179975c4b0c9f73dc..80856449be282ebc5f2bcbc9bae93b92f80fd302 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicomSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/05/23 14:18:04 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2007/06/26 15:42:14 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -96,31 +96,31 @@ int main(int argc, char *argv[])
    // Set the image size
    str.str("");
    str << SIZE_X;
-   header->InsertEntryString(str.str(),0x0028,0x0011); // Columns
+   header->InsertEntryString(str.str(),0x0028,0x0011,"US"); // Columns
 
    str.str("");
    str << SIZE_Y;
-   header->InsertEntryString(str.str(),0x0028,0x0010); // Rows
+   header->InsertEntryString(str.str(),0x0028,0x0010,"US"); // Rows
 
    // Set the pixel type
    str.str("");
    str << COMPONENT_SIZE * 8;
-   header->InsertEntryString(str.str(),0x0028,0x0100); // Bits Allocated
-   header->InsertEntryString(str.str(),0x0028,0x0101); // Bits Stored
+   header->InsertEntryString(str.str(),0x0028,0x0100,"US"); // Bits Allocated
+   header->InsertEntryString(str.str(),0x0028,0x0101,"US"); // Bits Stored
 
    str.str("");
    str << ( COMPONENT_SIZE * 8 ) - 1;
-   header->InsertEntryString(str.str(),0x0028,0x0102); // High Bit
+   header->InsertEntryString(str.str(),0x0028,0x0102,"US"); // High Bit
 
    // Set the pixel representation
    str.str("");
    str << "0"; // Unsigned
-   header->InsertEntryString(str.str(),0x0028,0x0103); // Pixel Representation
+   header->InsertEntryString(str.str(),0x0028,0x0103,"US"); // Pixel Representation
 
    // Set the samples per pixel
    str.str("");
    str << COMPONENT;
-   header->InsertEntryString(str.str(),0x0028,0x0002); // Samples per Pixel
+   header->InsertEntryString(str.str(),0x0028,0x0002,"US"); // Samples per Pixel
 
 
 // Step 2 : Create the output image