]> Creatis software - gdcm.git/blob - Testing/TestDicomDirElement.cxx
Fix mistypings
[gdcm.git] / Testing / TestDicomDirElement.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: TestDicomDirElement.cxx,v $
5   Language:  C++
6   Date:      $Date: 2007/05/23 14:18:06 $
7   Version:   $Revision: 1.7 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18 #include "gdcmDicomDirElement.h"
19 #include "gdcmDebug.h"
20 #include "gdcmGlobal.h"
21 #include "gdcmCommon.h"
22 #include <iostream>
23
24 int TestDicomDirElement(int , char *[])
25 {
26    GDCM_NAME_SPACE::DicomDirElement *ddElt = GDCM_NAME_SPACE::DicomDirElement::New();
27    if (ddElt == 0)
28    {
29       std::cout << "new DicomDirElement failed" << std::endl;
30       return 1;
31    }  
32    ddElt->Print( std::cout );
33
34    // Let's allow User to add an Entry (e.g Patient Weight )
35
36    // We can add an Entry to the default list of any of the Element
37  
38    // Add Patient Weight to the default list
39
40    // FIXME : Why doesn't it compile ?!?
41    // FIXME :`DD_PATIENT' undeclared (first use this function)
42    // FIXME : see gdcmCommon.h !!
43
44    //ddElt->AddDicomDirElement ( DD_PATIENT, 0x0010, 0x1010 );
45
46    // We could add others
47
48    std::cout << " -------- DicomDirElement After modif --------" <<std::endl;
49    ddElt->Print( std::cout );
50
51    ddElt->Delete();
52    return 0;
53 }