]> Creatis software - gdcm.git/blob - src/gdcmHeaderIdo.cxx
* src/gdcmHeader.cxx RecupLgr split in FindVR and RecupLgr. FindVR
[gdcm.git] / src / gdcmHeaderIdo.cxx
1 #include "gdcmIdo.h"
2 #include "gdcmUtil.h"
3
4 gdcmHeaderIdo::gdcmHeaderIdo (char* InFilename)
5         : gdcmHeader(InFilename)
6 { }
7
8 void gdcmHeaderIdo::BuildHeader(void) {
9          gdcmHeaderIdo::BuildHeader();
10         setAcrLibido();
11 }
12
13 /**
14  * \ingroup gdcmHeaderIdo
15  * \brief   Pour les fichiers non TrueDicom, si le recognition
16  *          code (0008,0010) s'avere etre "ACR_LIBIDO", alors
17  *          valide la reconnaissance du fichier en positionnant
18  *          filetype.
19  */
20 void gdcmHeaderIdo::setAcrLibido(void) {
21         string RecCode;
22         
23         if (   (filetype != TrueDicom)
24                  && (filetype != ExplicitVR)
25                  && (filetype != ImplicitVR) ) {
26                 printf("_setAcrLibido expects a presumably ACR file\n");
27                 // Recognition Code  --> n'existe plus en DICOM V3 ...
28                 RecCode = GetPubElValByNumber(0x0008, 0x0010);
29                 // FIXME NOW
30                 if (RecCode == "ACRNEMA_LIBIDO" ||
31                     RecCode == "CANRME_AILIBOD" )
32                         filetype = ACR_LIBIDO;
33                 else
34                         filetype = ACR;
35         }
36         return;
37 }