Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

idacr-restricted.h File Reference

#include "idcommon.h"

Go to the source code of this file.

Data Structures

struct  acr_element

Typedefs

typedef acr_element ACR_ELEMENT

Functions

int IdAcrWriteListeAcr (char *nf, ACR_ELEMENT *header)
 Ecriture d'un objet libido ds un fichier ACR avec ajouts d'ACR_ELEMENT.

ACR_ELEMENTIdAcrMakeListFromInfo (char **, char **)
ACR_ELEMENTIdAcrInquireHeader (char *, int)
 Retourne TOUTES les info sur l'objet stocke dans un fichier ACRNEMA. sous forme d'une liste d'ACR_ELEMENT. la 'valeur' de chaque element est suivie d'un ZERO binaire, car il est IMPOSSIBLE ( pour IdAcrInquireHeader) de savoir, dans le cas d'un element d'un groupe prive (impair), si un element de longueur 2 est un UNSIGNED SHORT INT ou un CHAR *... si un element de longueur 4 est un UNSIGNED LONG ou un CHAR *...

char ** _IdAcrInquireScanElscintInfoXXX (FILE *, char **)
char ** _IdAcrInquirePatientInfoXXX (FILE *, char **)
char ** _IdAcrInquireIRMInfoXXX (FILE *, char **)
int _IdAcrTestSwap (uint32_t)
int _IdAcrCheckSwap (FILE *)
ACR_ELEMENT_IdAcrMakeElement (int, int, long int, int, long int)
ACR_ELEMENT_IdAcrAddElement (ACR_ELEMENT *, ACR_ELEMENT *)
ACR_ELEMENT_IdAcrAppendElement (ACR_ELEMENT *, ACR_ELEMENT *)
ACR_ELEMENT_IdAcrFreeListe (ACR_ELEMENT *)
ACR_ELEMENT_IdAcrMergeListes (ACR_ELEMENT *, ACR_ELEMENT *)
ACR_ELEMENT_IdAcrReadNextElement (FILE *, int)
 lit l'acr_element courant. (le fichier doit deja avoir ete ouvert, et _IdAcrCheckSwap(FILE * fp) avoir ete appelle)

ACR_ELEMENT_IdAcrFindElement (ACR_ELEMENT *, int, int)
void _IdAcrAdjustLength (ACR_ELEMENT *)
void _IdAcrAffListe (ACR_ELEMENT *)
void _IdAcrAffListe2 (ACR_ELEMENT *, int, int)
void _IdAcrAffListeBref (ACR_ELEMENT *)
int _IdAcrAddHisto (char *)
long _IdAcrReadElement (int, int, FILE *, void *)
void * _IdAcrReadElementFromLabel (char *libelle, FILE *fp, char *vr, void *buff)
 Tente de lire un acr_element a partir de son libelle. Le resultat est range dans buff.

long _IdAcrOverWriteElement (int, int, FILE *, void *)
long _IdAcrGetElementLength (int, int, FILE *)
long _IdAcrModifElementLength (int, int, FILE *, uint32_t)
short int _IdAcrCheckType (FILE *, char *, int, int, int)
long _IdAcrGetPixelOffset (FILE *)
int IdAcrInquireInfo (char *, unsigned short int *OUTPUT, unsigned short int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT)
int IdAcrInquireInfoTot (char *, unsigned short int *OUTPUT, unsigned short int *OUTPUT, unsigned short int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT)
int IdAcrInquireInfoTot2 (char *, unsigned short int *OUTPUT, unsigned short int *OUTPUT, unsigned short int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT)
int IdAcrInquireInfoTot3 (char *, unsigned short int *OUTPUT, unsigned short int *OUTPUT, unsigned short int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT)


Typedef Documentation

typedef struct acr_element ACR_ELEMENT
 

Referenced by IdAcrInquireHeader().


Function Documentation

ACR_ELEMENT* _IdAcrAddElement ACR_ELEMENT ,
ACR_ELEMENT
 

Definition at line 1483 of file acrutil.c.

References DEBUG, acr_element::group, IdPrintf(), acr_element::length, acr_element::number, and acr_element::suiv.

Referenced by _IdAcrMergeListes(), and IdAcrWriteFileExtended().

int _IdAcrAddHisto char *   ) 
 

Definition at line 1895 of file acrutil.c.

void _IdAcrAdjustLength ACR_ELEMENT  ) 
 

Definition at line 1703 of file acrutil.c.

References _IdAcrFindElement(), acr_element::group, acr_element::length, acr_element::number, acr_element::suiv, and acr_element::value.

Referenced by IdAcrWriteFileExtended(), and IdAcrWriteListeAcr().

void _IdAcrAffListe ACR_ELEMENT  ) 
 

Definition at line 1741 of file acrutil.c.

References AN, AT, BD, BI, acr_element::group, IdPrintf(), acr_element::length, NO, acr_element::number, acr_element::suiv, acr_element::type, and acr_element::value.

Referenced by IdAcrWriteFileExtended(), and IdAcrWriteListeAcr().

void _IdAcrAffListe2 ACR_ELEMENT ,
int  ,
int 
 

Definition at line 1790 of file acrutil.c.

References __ID_offset, _ID_dicom_elements, __Dicom__el__::dicom_elem, __Dicom__el__::dicom_group, __Dicom__el__::dicom_libelle, __Dicom__el__::dicom_type, acr_element::group, IdPrintf(), acr_element::length, acr_element::number, acr_element::skippedLength, acr_element::suiv, and acr_element::value.

void _IdAcrAffListeBref ACR_ELEMENT  ) 
 

Definition at line 1765 of file acrutil.c.

References AN, AT, BD, BI, acr_element::group, IdPrintf(), acr_element::length, NO, acr_element::number, acr_element::suiv, acr_element::type, and acr_element::value.

ACR_ELEMENT* _IdAcrAppendElement ACR_ELEMENT ,
ACR_ELEMENT
 

Definition at line 1551 of file acrutil.c.

References DEBUG, acr_element::group, IdPrintf(), acr_element::length, acr_element::number, and acr_element::suiv.

Referenced by IdAcrInquireHeader().

int _IdAcrCheckSwap FILE *   ) 
 

Definition at line 256 of file acrutil.c.

References __ExplicitVR, __ID_CardioVascCurieux, __ID_offset, __Papyrus, __TrueDicom, _IdAcrTestSwap(), DEBUG, IdPrintf(), SEEK_SET, and x.

Referenced by _IdAcrGetPixelOffset(), _IdAcrPositionSwap(), IdAcrInquireHeader(), and IdAcrInquireInfoTot4().

short int _IdAcrCheckType FILE *  ,
char *  ,
int  ,
int  ,
int 
 

Definition at line 1079 of file acrread.c.

References _IdAcrGetElementLength(), _IdAcrReadElement(), DEBUG, IdErrPrintf(), IdPrintf(), TA_TY_CHAR, TA_TY_COMPLEX_DOUBLE, TA_TY_DOUBLE, TA_TY_FLOAT, TA_TY_LONG, TA_TY_SHORT, TA_TY_UCHAR, TA_TY_ULONG, TA_TY_USHORT, TY_CHAR, TY_COMPLEX_DOUBLE, TY_DOUBLE, TY_FLOAT, TY_LONG, TY_RGB, TY_SHORT, TY_UCHAR, TY_ULONG, and TY_USHORT.

Referenced by IdAcrInquireInfoTot4().

ACR_ELEMENT* _IdAcrFindElement ACR_ELEMENT ,
int  ,
int 
 

Definition at line 1685 of file acrutil.c.

References acr_element::group, acr_element::number, and acr_element::suiv.

Referenced by _IdAcrAdjustLength().

ACR_ELEMENT* _IdAcrFreeListe ACR_ELEMENT  ) 
 

Definition at line 1646 of file acrutil.c.

References acr_element::suiv.

Referenced by IdAcrWriteFileExtended().

long _IdAcrGetElementLength int  ,
int  ,
FILE * 
 

Referenced by _IdAcrCheckType().

long _IdAcrGetPixelOffset FILE *   ) 
 

Definition at line 677 of file acrread.c.

References __ID_CardioVascCurieux, __ID_offset, _IdAcrCheckSwap(), _IdAcrReadElement(), _IdAcrRecupLgr(), DEBUG, IdPrintf(), SEEK_CUR, SEEK_SET, and SWAP_SHORT().

Referenced by IdAcrGetPixelOffsetFromFile(), and IdAcrInquireInfoTot4().

char** _IdAcrInquireIRMInfoXXX FILE *  ,
char ** 
 

char** _IdAcrInquirePatientInfoXXX FILE *  ,
char ** 
 

char** _IdAcrInquireScanElscintInfoXXX FILE *  ,
char ** 
 

ACR_ELEMENT* _IdAcrMakeElement int  ,
int  ,
long  int,
int  ,
long  int
 

Definition at line 1450 of file acrutil.c.

References DEBUG, acr_element::group, IdPrintf(), acr_element::length, acr_element::number, acr_element::suiv, acr_element::type, and acr_element::value.

Referenced by IdAcrWriteFileExtended().

ACR_ELEMENT* _IdAcrMergeListes ACR_ELEMENT ,
ACR_ELEMENT
 

Definition at line 1665 of file acrutil.c.

References _IdAcrAddElement(), and acr_element::suiv.

Referenced by IdAcrWriteFileExtended().

long _IdAcrModifElementLength int  ,
int  ,
FILE *  ,
uint32_t 
 

Definition at line 1371 of file acrutil.c.

References _IdAcrRecupLgr(), DEBUG, IdPrintf(), SEEK_CUR, SEEK_SET, SWAP_LONG(), and SWAP_SHORT().

long _IdAcrOverWriteElement int  ,
int  ,
FILE *  ,
void * 
 

long _IdAcrReadElement int  ,
int  ,
FILE *  ,
void * 
 

Referenced by _IdAcrCheckType(), _IdAcrGetPixelOffset(), _IdAcrIsAcrLibido(), and IdAcrInquireInfoTot4().

void* _IdAcrReadElementFromLabel char *  libelle,
FILE *  fp,
char *  vr,
void *  buff
 

Tente de lire un acr_element a partir de son libelle. Le resultat est range dans buff.

Parameters:
libelle Libelle de l'acr_element a lire. Il s'agit du dernier champ de la variable globale _ID_dicom_elements, tel que "Group Length", "Priority" ou encore "AE Title".
fp File descriptor dans lequel effectuer la recherche.
vr DICOM_VR (cf la variable globale _ID_dicom_vr) retourne', pour permettre a l'appelant d'interpreter le contenu de buff.
buff Ou placer l'acr_element en cas de succes. Si NULL, l'allocation est faite localement.
Returns:
En cas de succes, le contenu de l'acr_element lu. Null en cas d'echec.

Definition at line 449 of file acrutil.c.

References _IdAcrReadElement_avec_creation(), _IdStrGetDicomTag(), DEBUG, and IdPrintf().

ACR_ELEMENT* _IdAcrReadNextElement FILE *  fp,
int  mode
 

lit l'acr_element courant. (le fichier doit deja avoir ete ouvert, et _IdAcrCheckSwap(FILE * fp) avoir ete appelle)

Parameters:
libelle Libelle de l'acr_element a lire. Il s'agit du dernier champ de la variable globale _ID_dicom_elements, tel que "Group Length", "Priority" ou encore "AE Title".
fp File descriptor dans lequel effectuer la recherche.
mode mode= 1 : on charge EGALEMENT les Elements 'longs' (>5000), 0 : on NE CHARGE PAS les Elements 'longs' (>5000) .
Returns:
En cas de succes, pointeur sur l'ACR_ELEMENT lu. Null en cas d'echec.

Definition at line 793 of file acrutil.c.

References __NumeroGroupePrecedent, _ID_dicom_elements, _IdAcrRecupLgr(), AT, BD, BI, DEBUG, __Dicom__el__::dicom_elem, __Dicom__el__::dicom_group, __Dicom__el__::dicom_type, acr_element::group, IdErrPrintf(), IdPrintf(), acr_element::length, NO, acr_element::number, SEEK_CUR, acr_element::skippedLength, acr_element::suiv, SWAP_LONG(), SWAP_SHORT(), acr_element::type, and acr_element::value.

Referenced by IdAcrInquireHeader().

int _IdAcrTestSwap uint32_t   ) 
 

Definition at line 205 of file acrutil.c.

References DEBUG, and IdPrintf().

Referenced by _IdAcrCheckSwap().

ACR_ELEMENT* IdAcrInquireHeader char *  filename,
int  mode
 

Retourne TOUTES les info sur l'objet stocke dans un fichier ACRNEMA. sous forme d'une liste d'ACR_ELEMENT. la 'valeur' de chaque element est suivie d'un ZERO binaire, car il est IMPOSSIBLE ( pour IdAcrInquireHeader) de savoir, dans le cas d'un element d'un groupe prive (impair), si un element de longueur 2 est un UNSIGNED SHORT INT ou un CHAR *... si un element de longueur 4 est un UNSIGNED LONG ou un CHAR *...

L'utilisateur desirant connaitre connaitre la valeur d'un element particulier saura, en consultant le 'Conformance Statement' de l'imageur sur lequel il travaille le type de cet element. il procedera alors comme suit:

unsigned short int gr =0x0010; .. par exemple .. unsigned short int num=0x0010; ACR_ELEMENT *elem=_IdAcrFindElement(liste,gr,num); uint32_t lgr = elem->length;

Selon que :

c'est un char * de lgr !=2, !=4 On l'utilisera directement : printf("%s\n",elem->value);

c'est un char * de lgr =4 On le Swappera : *(long *)elem->value=SWAP_LONG((*(long*)elem->value)); printf("%s\n",elem->value); c'est un char * de lgr =2 On le Swappera : *(long *)elem->value=SWAP_SHORT((*(long*)elem->value)); printf("%s\n",elem->value); c'est un short int On le castera : unsigned short int x = *(short int *) elem->value;

c'est un long int On le castera : unsigned long x = *(unsigned long *) elem->value;

Parameters:
filename Nom du Fichier ACR-NEMA ou DICOM.
mode = 1 : on charge EGALEMENT les Elements 'longs' (>5000) , = 0 : on NE CHARGE PAS les Elements 'longs' (>5000) ,
Returns:
Pointeur vers une ensemble chaine d'ACR_ELEMENT.

Definition at line 1029 of file acrread.c.

References __ID_CardioVascCurieux, __NumeroGroupePrecedent, _IdAcrAppendElement(), _IdAcrCheckSwap(), _IdAcrReadNextElement(), ACR_ELEMENT, acr_element::group, ID_RFILE_BIN, IDERR_NON_ACR_FILE, IdErrno, IdErrPrintf(), and SEEK_SET.

int IdAcrInquireInfo char *  ,
unsigned short int *  OUTPUT,
unsigned short int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT
 

Definition at line 1178 of file acrread.c.

References IdAcrInquireInfoTot4().

int IdAcrInquireInfoTot char *  ,
unsigned short int *  OUTPUT,
unsigned short int *  OUTPUT,
unsigned short int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT
 

Definition at line 1194 of file acrread.c.

References IdAcrInquireInfoTot4().

int IdAcrInquireInfoTot2 char *  ,
unsigned short int *  OUTPUT,
unsigned short int *  OUTPUT,
unsigned short int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT
 

Definition at line 1207 of file acrread.c.

References IdAcrInquireInfoTot4().

int IdAcrInquireInfoTot3 char *  ,
unsigned short int *  OUTPUT,
unsigned short int *  OUTPUT,
unsigned short int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT,
int *  OUTPUT
 

Definition at line 1219 of file acrread.c.

References IdAcrInquireInfoTot4().

ACR_ELEMENT* IdAcrMakeListFromInfo char **  ,
char ** 
 

int IdAcrWriteListeAcr char *  nf,
ACR_ELEMENT header
 

Ecriture d'un objet libido ds un fichier ACR avec ajouts d'ACR_ELEMENT.

Parameters:
nf nom du fichier a creer
obj pointeur sur une structure libido
Returns:
code retour (booleen)

Definition at line 669 of file acrwrite.c.

References _IdAcrAdjustLength(), _IdAcrAffListe(), AN, AT, BD, BI, DEBUG, acr_element::group, ID_WFILE_BIN, IDERR_OPEN_FAILED, IdErrno, IdPrintf(), acr_element::length, NO, acr_element::number, acr_element::suiv, acr_element::type, and acr_element::value.


Generated on Wed Oct 19 09:28:35 2005 for SIMRI3D by doxygen 1.3.7