00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
#include <string.h>
00117
#include "idio.h"
00118
#include "idprint.h"
00119
#include "idacr-private.h"
00120
#include "iddcm.h"
00121
00122
static int DEBUG=0;
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
#include <stdio.h>
00164
#include <stdlib.h>
00165
#include "idgen.h"
00166
#include "idsig.h"
00167
#include "idcnt.h"
00168
#include "idima.h"
00169
#include "idvol.h"
00170
#include "idseq.h"
00171
#include "idacr.h"
00172
#include "idacr-restricted.h"
00173
#include "iderr.h"
00174
00175
00176
int _IdAcrRecupLgr (FILE *fp,
int *);
00177
int _IdAcrIsAcrLibido (FILE *fp,
char *bufbid);
00178
00179
00180
short int SWAP_SHORT (
short int);
00181
long int SWAP_LONG (
long int);
00182
00183
static int ACR_LIBIDO;
00184
00185
static int rgb;
00186
00187
static int sw;
00188
static char * _message;
00189
00190 extern int __ID_CardioVascCurieux;
00191 extern int __ID_offset;
00192 extern int __Papyrus;
00193 extern unsigned short int __NumeroGroupePrecedent;
00194 extern int __TrueDicom;
00195 extern int __ExplicitVR;
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250 #define CCS(Type) \
00251
if(!fread(&((Type)psi)[0],IdSigDimX(psi)*IdSizeOfType(psi),1,fp)) \
00252
\
00253
{ \
00254
IdSigFree(psi); \
00255
IdErrPrintf("echec en lecture Signal\n");\
00256
return(0); \
00257
}
00258
00259 #define CCC(Type) \
00260
if(!fread(&((Type)pco)[0],IdCntDimX(pco)*IdSizeOfType(pco),1,fp)) \
00261
\
00262
{ \
00263
IdCntFree(pco); \
00264
IdErrPrintf("echec en lecture Contour\n"); \
00265
return(0); \
00266
}
00267
00268
00269 #define CCC2(Type) \
00270
if(!fread(&((Type)pco)[0],IdCntDimX(pco)*IdSizeOfType(pco)>>1,1,fp))\
00271
\
00272
{ \
00273
IdCntFree(pco); \
00274
IdErrPrintf("echec en lecture Contour\n"); \
00275
return(0); \
00276
}
00277
00278 #define CCI(Type,TailleType) \
00279
{ \
00280
if (vector != NULL) { \
00281 if(!fread(vector,(int)dim[0]*(int)dim[1]*TailleType,1,fp)){ \
00282 IdPrintf("echec en lecture Image dans Vecteur \n"); \
00283 return(0); \
00284 } \
00285 } else { \
00286 for(i=0;i<IdImaDimY(pim);i++){ \
00287 if(!fread(((Type)pim)[i],IdImaDimX(pim)*IdSizeOfType(pim),1,fp)) { \
00288 IdPrintf("echec en lecture Image [i : %d] lgr de %d \n", \
00289 i,IdImaDimX(pim)*IdSizeOfType(pim)); \
00290 IdImaFree(pim); \
00291 return(0); \
00292 } \
00293 } \
00294 } \
00295 } \
00296
00297 #define CCV(Type) \
00298
for(j=0;j<IdVolDimZ(pvo);j++) \
00299
for(i=0;i<IdVolDimY(pvo);i++) \
00300
if(!fread(((Type)pvo)[j][i],IdVolDimX(pvo)*IdSizeOfType(pvo),1,fp)) \
00301
{ \
00302
IdVolFree(pvo); \
00303
IdErrPrintf("echec en lecture Volume\n"); \
00304
return(0); \
00305
}
00306
00307 #define CCQ(Type) \
00308
for(k=0;k<IdSeqDimT(pse);k++) \
00309
for(j=0;j<IdSeqDimZ(pse);j++) \
00310
for(i=0;i<IdSeqDimY(pse);i++) \
00311
if(!fread(((Type)pse)[k][j][i],IdSeqDimX(pse)*IdSizeOfType(pse),1,fp)) \
00312
{ \
00313
IdSeqFree(pse); \
00314
IdErrPrintf("echec en lecture Sequence\n");\
00315
return(0); \
00316
}
00317
00318
00319
00320
00321
00322
00360 void *
IdAcrReadFileIntoVector(
char *filename,
int type,
int premIm,
int dernIm,
void * vector) {
00361
00362
return IdDcmReadFileIntoVector(filename, type, premIm, dernIm, vector) ;
00363
return (NULL);
00364 }
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00486 int IdAcrInquireInfoTot4 (
char * filename,
00487
unsigned short int *typObj,
00488
unsigned short int *typLibido,
00489
unsigned short int *typData,
00490
int *NX,
00491
int *NY,
00492
int *NZ,
00493
int *NT,
00494
int *offset,
00495
int *nbFrames,
00496
int *codeSwap,
00497
int *bitsAllocated,
00498
int *bitsStored,
00499
int *highBit,
00500
int *signe)
00501 {
00502 FILE *fp;
00503
short int ndim,nb,nbu,hb,ty;
00504
short int dim[4];
00505
int i ;
00506
char bufbid[150];
00507
long int nbCarLus;
00508
00509
if((fp=fopen(filename,
ID_RFILE_BIN))==0) {
00510
IdErrno=
IDERR_OPEN_FAILED;
00511
IdErrPrintf (
"echec ouverture %s\n",filename);
00512
return (0);
00513 }
else
00514 sw=
_IdAcrCheckSwap(fp);
00515
00516
if(sw==-1) {
00517
IdErrno=
IDERR_NON_ACR_FILE;
00518 fclose ( fp );
00519
return (0);
00520 }
00521
00522 *codeSwap=sw;
00523
00524
if (
__ID_CardioVascCurieux == 1) {
00525 printf(
"ID_CardioVascCurieux : 2\n");
00526 fseek(fp,0L,
SEEK_SET);
00527 }
else {
00528 ACR_LIBIDO =
_IdAcrIsAcrLibido (fp,bufbid);
00529 }
00530
00531 *typData=0;
00532 nbCarLus=
_IdAcrReadElement(0x0028,0x0004,fp,bufbid);
00533
00534
if(nbCarLus!=0) {
00535
00536 bufbid[nbCarLus]=0;
00537
00538
if ( (memcmp(bufbid,
"RGB ",4)==0)
00539 ||
00540 (memcmp(bufbid,
"B RG",4)==0)
00541 ||
00542 (memcmp(bufbid,
" BGR",4)==0)
00543 ||
00544 (memcmp(bufbid,
"GR B",4)==0) ) {
00545
00546 *typData=
TY_RGB;
00547
IdPrintf (
"Image RGB !\n");
00548 }
00549
00550 }
00551
00552
00553
00554
if (!
_IdAcrReadElement(0x0028,0x0005,fp,&ndim)) {
00555 ndim=2;
00556 }
00557
00558
if(ndim>4) {
00559
IdPrintf (
" Nb de Dimensions incorrect : %d\n", ndim);
00560 fclose ( fp );
00561
return(0);
00562 }
00563
00564
00565
00566
if ((nbCarLus=
_IdAcrReadElement(0x0028,0x0008,fp,bufbid))==0) {
00567 *nbFrames=1;
00568 }
else
00569 *nbFrames=atoi(bufbid);
00570
00571
for(i=0;i<ndim;i++)
00572
if(!
_IdAcrReadElement(0x0028,0x0010+i,fp,&dim[i])) {
00573
00574
IdErrno=
IDERR_NON_ACR_FILE;
00575 fclose ( fp );
00576
return (0);
00577 }
00578
00579
if (ACR_LIBIDO!=1) {
00580
00581
int secuDim;
00582 secuDim = dim[0];
00583 dim[0] = dim[1];
00584 dim[1] = secuDim;
00585 }
00586
00587 *NT = *NZ = *NY = *NX = 1;
00588
switch(ndim) {
00589
case 4: *NT=dim[3];
00590
case 3: *NZ=dim[2];
00591
case 2: *NY=dim[1];
00592
case 1: *NX=dim[0];
00593 }
00594
00595
switch (ndim) {
00596
case 1: *typObj=
SIG;
break;
00597
case 2: *typObj=
IMA;
break;
00598
case 3: *typObj=
VOL;
break;
00599
case 4: *typObj=
SEQ;
break;
00600
default: {
00601
IdErrno=
IDERR_NON_ACR_FILE;
00602 fclose ( fp );
00603
return (0);
00604 }
00605 }
00606
00607
if(!
_IdAcrReadElement(0x0028,0x0100,fp,&nb)) {
00608
00609
IdErrno=
IDERR_NON_ACR_FILE;
00610 fclose ( fp );
00611
return (0);
00612 }
00613 *bitsAllocated = nb;
00614
00615
if(!
_IdAcrReadElement(0x0028,0x0101,fp,&nbu)) {
00616
00617 nbu=nb;
00618 }
00619 *bitsStored = nbu;
00620
00621
if(!
_IdAcrReadElement(0x0028,0x0102,fp,&hb)) {
00622
00623 hb=nbu-1;
00624 }
00625 *highBit = hb;
00626
00627
00628
if(!
_IdAcrReadElement(0x0028,0x0103,fp,&ty)) {
00629
00630 ty=0;
00631 }
00632 *signe = ty;
00633
00634
00635
00636
00637
00638
00639
00640 *typLibido=
_IdAcrCheckType(fp, bufbid, (
int)ty, (
int)nb, *typObj);
00641
00642 *typData = *typLibido &
TY_SIZE;
00643
00644
00645
00646
00647 *offset =
_IdAcrGetPixelOffset(fp);
00648
00649 fclose ( fp );
00650
00651
return 1;
00652 }
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677 long _IdAcrGetPixelOffset(FILE *fp)
00678 {
00679
unsigned short g,gr;
00680
unsigned short n,num;
00681
int l;
00682
int flag;
00683
int skL;
00684
int lgrTot=
__ID_offset;
00685
00686
int __cas_de_fou_Philips =0;
00687
00688
if (
DEBUG)
00689
IdPrintf (
" _IdAcrGetPixelOffset : __ID_offset = %d\n",
__ID_offset);
00690
00691
00692
00693
00694
00695 sw=
_IdAcrCheckSwap(fp);
00696
00697
if (
DEBUG)
00698
IdPrintf (
" \n_IdAcrGetPixelOffset : sortie _IdAcrCheckSwap\n\n");
00699
00700
if (
__ID_CardioVascCurieux == 1)
00701 {
00702 printf(
"ID_CardioVascCurieux : 3\n");
00703
if (
DEBUG)
00704
IdPrintf(
" _IdAcrGetPixelOffset : __ID_CardioVascCurieux = 1\n");
00705 fseek(fp,0L,
SEEK_SET);
00706 }
00707
00708
00709
00710
if(!
_IdAcrReadElement(0x0028,0x0200,fp,&gr))
00711 gr=0x7FE0;
00712
if (
DEBUG)
00713
IdPrintf (
" _IdAcrGetPixelOffset : numGrPixels %x\n",gr);
00714
00715
if (!(gr==0x7FE0))
00716 num=0x1010;
00717
else
00718 num=0x0010;
00719
00720
if (
__ID_CardioVascCurieux == 1) {
00721 num=0x0010;
00722 printf(
"ID_CardioVascCurieux : 4\n");
00723 }
00724
00725
if (
DEBUG)
00726
IdPrintf (
" _IdAcrGetPixelOffset : numEltPixels %x\n",num);
00727
00728
00729
00730
if (
DEBUG)
00731
IdPrintf(
" _IdAcrGetPixelOffset : Recherche gr %x num"
00732
"%x (swapping %d)\n",gr,num,sw);
00733
00734
00735
00736 sw=
_IdAcrCheckSwap(fp);
00737
00738
if (
DEBUG)
00739
IdPrintf (
" _IdAcrGetPixelOffset : sortie _IdAcrCheckSwap\n");
00740
00741
if (
__ID_CardioVascCurieux == 1)
00742 {
00743 printf(
"ID_CardioVascCurieux : 5\n");
00744
if (
DEBUG)
00745
IdPrintf(
" _IdAcrGetPixelOffset : __ID_CardioVascCurieux = 1\n");
00746 fseek(fp,0L,
SEEK_SET);
00747 }
00748
00749
if (
DEBUG)
00750
IdPrintf (
" \n_IdAcrGetPixelOffset : On lance le comptage\n\n");
00751
00752 l=0;
00753 flag=0;
00754
00755
00756
while(fread(&g,2,1,fp)) {
00757
if(sw)
00758 g=
SWAP_SHORT(((
short)g));
00759 fread(&n,2,1,fp);
00760
if(sw)
00761 n=
SWAP_SHORT(((
short)n));
00762 l=
_IdAcrRecupLgr(fp, &skL);
00763
if (
DEBUG)
00764
IdPrintf(
" _IdAcrGetPixelOffset : fread g %x "
00765
"n %x l %d 0x%08x\n",g,n,l,l);
00766
00767
if((g==gr)&&(n==num)) {
00768
00769 lgrTot = lgrTot + 2 +2 + skL;
00770
00771
if (
DEBUG)
00772
IdPrintf(
"_IdAcrGetPixelOffset : sortie avec offset %d\n",
00773 lgrTot);
00774
return lgrTot;
00775
00776 }
else if( ( (g>gr)||((gr==g)&&(n>num)) ) &&
00777 ( g < 0xff00 )
00778 ) {
00779
00780
IdPrintf(
"_IdAcrGetPixelOffset : Kross Katastrof : on a depasse"
00781
" le groupe des Pixels :-( \n");
00782 }
else {
00783
if (g>0xff00) {
00784
if (
DEBUG)
IdPrintf(
"_IdAcrGetPixelOffset : cas de fou Phiplips\n");
00785 __cas_de_fou_Philips=1;
00786 }
00787 fseek(fp,l,
SEEK_CUR);
00788 lgrTot = lgrTot + l +2 +2 +skL;
00789
if (
DEBUG)
00790
IdPrintf(
"_IdAcrGetPixelOffset : on saute a "
00791
"l ele sv : lgrTot (part) %d\n",
00792 lgrTot);
00793 }
00794 }
00795
return(0);
00796 }
00797
00798
00799
00809 long IdAcrGetPixelOffsetFromFile(
char *filename)
00810 {
00811 FILE *fp;
00812
long result;
00813
if((fp=fopen(filename,
ID_RFILE_BIN))==0) {
00814
IdErrPrintf (
"echec ouverture %s\n", filename);
00815
return (0);
00816 }
00817 result =
_IdAcrGetPixelOffset(fp);
00818 fclose(fp);
00819
return result;
00820 }
00821
00822
00823
00824
00825
00854 void *
IdAcrReadFile(
char * filename,
int type)
00855 {
00856
void ** tabObj=NULL;
00857
00858 tabObj=
IdAcrReadFileIntoVector(filename, type,-2, -2, NULL);
00859
00860
if (tabObj==NULL)
00861
return (NULL);
00862
else
00863
return(tabObj[0]);
00864 }
00865
00866
00867
00868
00869
00870
00871
00904 void *
IdDcmCVReadFile(
char * filename,
int type,
int numPremIm,
int numDernIm)
00905 {
00906
void ** tabObj=NULL;
00907
00908 tabObj=
IdAcrReadFileIntoVector(filename,type, numPremIm, numDernIm, NULL);
00909
00910
if (tabObj==NULL)
00911
return (NULL);
00912
else
00913
return(tabObj[0]);
00914 }
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976
00977
00978
00979
00980
00981
00982
00983
01029 ACR_ELEMENT *
IdAcrInquireHeader(
char *filename,
int mode)
01030 {
01031 FILE * fp;
01032
ACR_ELEMENT *p, *liste=NULL;
01033
01034
if((fp=fopen(filename,
ID_RFILE_BIN))==0) {
01035
IdErrPrintf (
"echec ouverture %s\n",filename);
01036
return (NULL);
01037 }
01038 sw=
_IdAcrCheckSwap(fp);
01039
01040
if (
__ID_CardioVascCurieux) {
01041 fseek(fp,0L,
SEEK_SET);
01042 printf(
"ID_CardioVascCurieux : 6\n");
01043 }
01044
01045
if(sw==-1) {
01046
IdErrPrintf (
"fichier %s non ACR\n",filename);
01047
IdErrno=
IDERR_NON_ACR_FILE;
01048
return (NULL);
01049 }
01050
__NumeroGroupePrecedent = 0;
01051
01052
while ( (p=
_IdAcrReadNextElement(fp,mode)) ) {
01053
if (mode==2) {
01054
if(!(p->
group%2)) {
01055 liste=
_IdAcrAppendElement(liste,p);
01056 }
01057 }
else {
01058 liste=
_IdAcrAppendElement(liste,p);
01059 }
01060 }
01061
return (liste);
01062 }
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079 short int _IdAcrCheckType(FILE * fp,
char * bufbid,
int ity,
int inb,
int itypObj)
01080 {
01081
long int lgrMessage;
01082
short int typ;
01083
short int ty=ity;
01084
short int nb=inb;
01085
short int typObj=itypObj;
01086
01087
01088
if (nb==12) nb=8;
01089
01090 typ= -1;
01091
if ( (memcmp(bufbid,
"ACRNEMA_LIBIDO",14)==0)
01092 ||
01093 (memcmp(bufbid,
"CANRME_AILIBOD",14)==0)
01094 ) {
01095
if (
DEBUG)
IdPrintf (
"on a trouve ACR LIBIDO\n");
01096
01097
if (!
_IdAcrReadElement(0x0028,0x0105,fp,&typ))
01098
_IdAcrReadElement(0x0028,0x0199,fp,&typ) ;
01099
if (
DEBUG)
IdPrintf (
"type lu sur disque %x\n",typ);
01100 }
01101
01102
if (typ==-1) {
01103
01104
01105
01106
if((nb==
TA_TY_UCHAR*8) && (ty==0))typ = typObj |
TY_UCHAR;
01107
else if((nb==
TA_TY_CHAR*8) && (ty==1))typ = typObj |
TY_CHAR;
01108
else if((nb==
TA_TY_USHORT*8)&& (ty==0))typ = typObj |
TY_USHORT;
01109
else if((nb==
TA_TY_SHORT*8) && (ty==1))typ = typObj |
TY_SHORT;
01110
else if((nb==
TA_TY_ULONG*8) && (ty==0))typ = typObj |
TY_ULONG;
01111
else if((nb==
TA_TY_LONG*8) && (ty==1))typ = typObj |
TY_LONG;
01112
01113
01114
01115
01116
01117
01118
01119
else if ((nb==
TA_TY_FLOAT*8) ) typ = typObj |
TY_FLOAT;
01120
else if ((nb==
TA_TY_DOUBLE*8) ) typ = typObj |
TY_DOUBLE;
01121
else if ((nb==3*
TA_TY_UCHAR*8)&&(ty==0)) typ = typObj |
TY_RGB;
01122
else if ((nb==
TA_TY_COMPLEX_DOUBLE*8)) typ = typObj |
TY_COMPLEX_DOUBLE;
01123
01124
if (
DEBUG)
IdPrintf (
"Entete : nb=%d typObj=%x; Type deduit=%x\n",
01125 nb,typObj,typ);
01126
01127
01128
01129 _message=(
char *)malloc(10);
01130 lgrMessage=0;
01131
01132 }
else {
01133
01134
01135
01136
01137 lgrMessage=
_IdAcrGetElementLength(0x0028,0x0198,fp);
01138
if (lgrMessage !=0) {
01139
if (
DEBUG)
IdPrintf (
"lgrMessage %ld\n", lgrMessage);
01140 _message=(
char *)malloc(lgrMessage+1);
01141
if (!_message) {
01142
IdErrPrintf(
"Impossible d allouer de la place pour _message ...\n");
01143 _message=(
char *)malloc(10);
01144 }
01145
else
01146
01147
_IdAcrReadElement(0x0028,0x0198,fp,_message) ;
01148 }
01149
else
01150 _message=(
char *)malloc(10);
01151 }
01152 _message[lgrMessage]=
'\0';
01153
01154
return typ;
01155 }
01156
01157
01158
01159
01160
01161
01162
01163
01164
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178 int IdAcrInquireInfo (
char * filename,
unsigned short int *typObj,
unsigned short int *typData,
int *NX,
int *NY,
int *NZ,
int *offset )
01179 {
01180
unsigned short int typLibido;
01181
int NT;
01182
int nbFrames;
01183
int codeSwap;
01184
int nb;
01185
int nbu;
01186
int hb;
01187
int signe;
01188
return (
IdAcrInquireInfoTot4 ( filename,typObj,&typLibido,typData,NX,NY,NZ,&NT,offset,&nbFrames,&codeSwap,&nb,&nbu,&hb,&signe ) );
01189
01190 }
01191
01192
01193
01194 int IdAcrInquireInfoTot (
char * filename,
unsigned short int *typObj,
unsigned short int *typLibido,
unsigned short int *typData,
int *NX,
int *NY,
int *NZ,
int *NT,
int *offset )
01195 {
01196
int nbFrames;
01197
int codeSwap;
01198
int nb;
01199
int nbu;
01200
int hb;
01201
int signe;
01202
return (
IdAcrInquireInfoTot4 ( filename,typObj,typLibido,typData,NX,NY,NZ,NT,offset,&nbFrames,&codeSwap,&nb,&nbu,&hb,&signe ) );
01203 }
01204
01205
01206
01207 int IdAcrInquireInfoTot2 (
char * filename,
unsigned short int *typObj,
unsigned short int *typLibido,
unsigned short int *typData,
int *NX,
int *NY,
int *NZ,
int *NT,
int *offset,
int *nbFrames )
01208 {
01209
int codeSwap;
01210
int nb;
01211
int nbu;
01212
int hb;
01213
int signe;
01214
return (
IdAcrInquireInfoTot4 ( filename,typObj,typLibido,typData,NX,NY,NZ,NT,offset,nbFrames,&codeSwap,&nb,&nbu,&hb,&signe ) );
01215 }
01216
01217
01218
01219 int IdAcrInquireInfoTot3 (
char * filename,
unsigned short int *typObj,
unsigned short int *typLibido,
unsigned short int *typData,
int *NX,
int *NY,
int *NZ,
int *NT,
int *offset,
int *nbFrames,
int *codeSwap )
01220 {
01221
int nb;
01222
int nbu;
01223
int hb;
01224
int signe;
01225
return (
IdAcrInquireInfoTot4 ( filename,typObj,typLibido,typData,NX,NY,NZ,NT,offset,nbFrames,codeSwap,&nb,&nbu,&hb,&signe ) );
01226 }
01227
01228
01229
01230
01231 int _IdAcrIsAcrLibido(FILE *fp,
char *bufbid)
01232 {
01233
if (
__TrueDicom == 0) {
01234
01235
01236
01237
01238
01239
if(
_IdAcrReadElement(0x0008,0x0010,fp,bufbid)!=0) {
01240
01241
if ( (memcmp(bufbid,
"ACRNEMA_LIBIDO",14)==0)
01242
01243 || (memcmp(bufbid,
"CANRME_AILIBOD",14)==0))
01244
01245
return(1);
01246 }
01247 }
01248
01249
return(0);
01250 }
01251
01252
01253
01254
01255 void _IdAcrPositionSwap(FILE* fp)
01256 {
01257 sw =
_IdAcrCheckSwap(fp);
01258 }