00001 /************************************************************************* 00002 * $Id: idseq.h,v 1.1 2005/09/09 08:22:39 bellet Exp $ 00003 ************************************************************************** 00004 This software is governed by the CeCILL license under French law and 00005 abiding by the rules of distribution of free software. You can use, 00006 modify and/ or redistribute the software under the terms of the CeCILL 00007 license as circulated by CEA, CNRS and INRIA at the following URL 00008 "http://www.cecill.info". 00009 00010 As a counterpart to the access to the source code and rights to copy, 00011 modify and redistribute granted by the license, users are provided only 00012 with a limited warranty and the software's author, the holder of the 00013 economic rights, and the successive licensors have only limited 00014 liability. 00015 00016 In this respect, the user's attention is drawn to the risks associated 00017 with loading, using, modifying and/or developing or reproducing the 00018 software by the user in light of its specific status of free software, 00019 that may mean that it is complicated to manipulate, and that also 00020 therefore means that it is reserved for developers and experienced 00021 professionals having in-depth computer knowledge. Users are therefore 00022 encouraged to load and test the software's suitability as regards their 00023 requirements in conditions enabling the security of their systems and/or 00024 data to be ensured and, more generally, to use and operate it in the 00025 same conditions as regards security. 00026 00027 The fact that you are presently reading this means that you have had 00028 knowledge of the CeCILL license and that you accept its terms. 00029 00030 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 00031 l'Image). All rights reserved. See License.txt for details. 00032 00033 Version 1.0 05/09/2005 00034 *************************************************************************/ 00035 00036 #ifndef __IDSEQ_H__ 00037 #define __IDSEQ_H__ 00038 /************************************************************************* 00039 * 00040 * Description : Declarations diverses permettant d'utiliser le type SEQUENCE 00041 * de la bibliotheque LIBIDO 00042 * 00043 **************************************************************************/ 00044 #include "idgen.h" 00045 #include "idvol.h" 00046 #include "idpoint.h" 00047 00048 /* Types de sequence 4D */ 00049 00050 #define SEQ_CHAR (SEQ | TY_CHAR) 00051 #define SEQ_UCHAR (SEQ | TY_UCHAR) 00052 #define SEQ_SHORT (SEQ | TY_SHORT) 00053 #define SEQ_USHORT (SEQ | TY_USHORT) 00054 #define SEQ_LONG (SEQ | TY_LONG) 00055 #define SEQ_ULONG (SEQ | TY_ULONG) 00056 #define SEQ_FLOAT (SEQ | TY_FLOAT) 00057 #define SEQ_DOUBLE (SEQ | TY_DOUBLE) 00058 #define SEQ_COMPLEX (SEQ | TY_COMPLEX) 00059 #define SEQ_RGB (SEQ | TY_RGB) 00060 #define SEQ_COMPLEX_DOUBLE (SEQ | TY_COMPLEX_DOUBLE) 00061 #define SEQ_COMPLEX_FLOAT (SEQ | TY_COMPLEX_FLOAT ) 00062 #define SEQ_COMPLEX_CHAR (SEQ | TY_COMPLEX_CHAR ) 00063 #define SEQ_COMPLEX_UCHAR (SEQ | TY_COMPLEX_UCHAR ) 00064 #define SEQ_COMPLEX_SHORT (SEQ | TY_COMPLEX_SHORT ) 00065 #define SEQ_COMPLEX_USHORT (SEQ | TY_COMPLEX_USHORT) 00066 #define SEQ_COMPLEX_LONG (SEQ | TY_COMPLEX_LONG ) 00067 #define SEQ_COMPLEX_ULONG (SEQ | TY_COMPLEX_ULONG ) 00068 #define SEQ_BIT (SEQ | TY_BIT ) 00069 #define SEQ_POINTER (SEQ | TY_POINTER ) 00070 00071 /************************************************************************/ 00072 00073 typedef void **** PPPPSEQUENCE; 00074 typedef char **** PPPPSEQUENCE_CHAR; 00075 typedef unsigned char **** PPPPSEQUENCE_UCHAR; 00076 typedef float **** PPPPSEQUENCE_FLOAT; 00077 typedef double **** PPPPSEQUENCE_DOUBLE; 00078 typedef COMPLEX **** PPPPSEQUENCE_COMPLEX; 00079 typedef RGB **** PPPPSEQUENCE_RGB; 00080 typedef short **** PPPPSEQUENCE_SHORT; 00081 typedef unsigned short **** PPPPSEQUENCE_USHORT; 00082 typedef long **** PPPPSEQUENCE_LONG; 00083 typedef unsigned long **** PPPPSEQUENCE_ULONG; 00084 typedef COMPLEX_DOUBLE **** PPPPSEQUENCE_COMPLEX_DOUBLE; 00085 typedef COMPLEX_FLOAT **** PPPPSEQUENCE_COMPLEX_FLOAT; 00086 typedef COMPLEX_CHAR **** PPPPSEQUENCE_COMPLEX_CHAR; 00087 typedef COMPLEX_UCHAR **** PPPPSEQUENCE_COMPLEX_UCHAR; 00088 typedef COMPLEX_SHORT **** PPPPSEQUENCE_COMPLEX_SHORT; 00089 typedef COMPLEX_USHORT **** PPPPSEQUENCE_COMPLEX_USHORT; 00090 typedef COMPLEX_LONG **** PPPPSEQUENCE_COMPLEX_LONG; 00091 typedef COMPLEX_ULONG **** PPPPSEQUENCE_COMPLEX_ULONG; 00092 typedef PPPPSEQUENCE_UCHAR PPPPPPSEQUENCE_BIT; 00093 typedef void **** PPPPSEQUENCE_POINTER; 00094 00095 /* structure SEQUENCE */ 00096 00097 typedef struct 00098 { 00099 int UsedNbT; 00100 int UsedNbZ; /* JPR */ 00101 int UsedNbY; 00102 int UsedNbX; 00103 int subObject; /* JPR */ 00104 int DimT; 00105 int DimZ; 00106 int DimY; 00107 int DimX; 00108 int Numero; 00109 char *_message,*_fichier; 00110 int BitsPerPixel; /* nombre de bits reellement utilises */ 00111 int Type; /* IMPERATIVEMENT DERNIER DE LA STRUCTURE */ 00112 00113 } PRIVATE_SEQUENCE; 00114 00115 00116 #include "idseq-restricted.h" 00117 00118 #define _IdSeqPrivate(seq) ( ((PRIVATE_SEQUENCE*)(seq) )-1 ) 00119 #ifndef SWIG 00120 #define IdSeqDimX(sequence_) ( (_IdSeqPrivate(sequence_) )->DimX) 00121 #define IdSeqDimY(sequence_) ( (_IdSeqPrivate(sequence_) )->DimY) 00122 #define IdSeqDimZ(sequence_) ( (_IdSeqPrivate(sequence_) )->DimZ) 00123 #define IdSeqDimT(sequence_) ( (_IdSeqPrivate(sequence_) )->DimT) 00124 00125 #define IdSeqUsedNbX(sequence_) ( (_IdSeqPrivate(sequence_) )->UsedNbX) 00126 #define IdSeqUsedNbY(sequence_) ( (_IdSeqPrivate(sequence_) )->UsedNbY) 00127 #define IdSeqUsedNbZ(sequence_) ( (_IdSeqPrivate(sequence_) )->UsedNbZ) 00128 #define IdSeqUsedNbT(sequence_) ( (_IdSeqPrivate(sequence_) )->UsedNbT) 00129 00130 #define IdSeqSetUsedNbX(seq_,nb) ( _IdSeqPrivate(seq_)->UsedNbX=(nb) ) 00131 #define IdSeqGetUsedNbX(seq_) ( _IdSeqPrivate(seq_)->UsedNbX) 00132 #define IdSeqSetUsedNbY(seq_,nb) ( _IdSeqPrivate(seq_)->UsedNbY=(nb) ) 00133 #define IdSeqGetUsedNbY(seq_) ( _IdSeqPrivate(seq_)->UsedNbY) 00134 #define IdSeqSetUsedNbZ(seq_,nb) ( _IdSeqPrivate(seq_)->UsedNbZ=(nb) ) 00135 #define IdSeqGetUsedNbZ(seq_) ( _IdSeqPrivate(seq_)->UsedNbZ) 00136 #define IdSeqSetUsedNbT(seq_,nb) ( _IdSeqPrivate(seq_)->UsedNbT=(nb) ) 00137 #define IdSeqGetUsedNbT(seq_) ( _IdSeqPrivate(seq_)->UsedNbT) 00138 00139 #define IdSeqGetBit(seq,x,y,z,t) (((seq)[t][z][y][(x)>>3]>>((x)&7) )&1) 00140 #define IdSeqPutBit(seq,x,y,z,t,n) \ 00141 ( (n) \ 00142 ? ( ((seq)[t][z][y][x>>3])|= (1<<((x)&7) ) ) \ 00143 : ( ((seq)[t][z][y][x>>3])&=~(1<<((x)&7) ) ) ) 00144 00145 #define IdSeqType(sequence_) ( (_IdSeqPrivate(sequence_) )->Type) 00146 00147 #else 00148 int IdSeqDimX(PPPPSEQUENCE); 00149 int IdSeqDimY(PPPPSEQUENCE); 00150 int IdSeqDimZ(PPPPSEQUENCE); 00151 int IdSeqDimT(PPPPSEQUENCE); 00152 00153 int IdSeqUsedNbX(PPPPSEQUENCE); 00154 int IdSeqUsedNbY(PPPPSEQUENCE); 00155 int IdSeqUsedNbZ(PPPPSEQUENCE); 00156 int IdSeqUsedNbT(PPPPSEQUENCE); 00157 00158 int IdSeqSetUsedNbX(PPPPSEQUENCE,int); 00159 int IdSeqSetUsedNbY(PPPPSEQUENCE,int); 00160 int IdSeqSetUsedNbZ(PPPPSEQUENCE,int); 00161 int IdSeqSetUsedNbT(PPPPSEQUENCE,int); 00162 00163 int IdSeqGetUsedNbX(PPPPSEQUENCE); 00164 int IdSeqGetUsedNbY(PPPPSEQUENCE); 00165 int IdSeqGetUsedNbZ(PPPPSEQUENCE); 00166 int IdSeqGetUsedNbT(PPPPSEQUENCE); 00167 00168 int IdSeqGetBit(PPPPSEQUENCE_UCHAR,int,int,int,int); 00169 int IdSeqPutBit(PPPPSEQUENCE_UCHAR,int,int,int,int,int); 00170 00171 int IdSeqType(PPPPSEQUENCE); 00172 #endif 00173 00174 PPPPSEQUENCE IdSeqVecteurToSequence (void *, int, int, int, int, int ); 00175 00176 /* 00177 *utilisation: 00178 * 00179 * #include <idseq.h> 00180 * PPPPSEQUENCE_UCHAR vouser; 00181 * vouser=(PPPPSEQUENCE_UCHAR)IdSeqAlloc(...); 00182 * .../... 00183 * vouser[i][j][k][l]=... 00184 * IdSeqDimX(vouser) 00185 * .../... 00186 * IdSeqFree(vouser); 00187 */ 00188 00189 /* Allocation d'une sequence identique a une autre */ 00190 00191 #ifndef SWIG 00192 #define IdSeqAllocLikeSequence(vo) ((!(vo) ) ? 0 \ 00193 : IdSeqAlloc(IdSeqDimX(vo), IdSeqDimY(vo), \ 00194 IdSeqDimZ(vo), IdSeqDimT(vo), \ 00195 IdSeqType(vo) ) ) 00196 00197 /* Test d'egalite des dimensions et du type de deux sequences */ 00198 00199 #define IdSeqSameSizeAndType(vo1,vo2) ((IdSeqDimX(vo1)==IdSeqDimX(vo2) ) && \ 00200 (IdSeqDimY(vo1)==IdSeqDimY(vo2) ) && \ 00201 (IdSeqDimZ(vo1)==IdSeqDimZ(vo2) ) && \ 00202 (IdSeqDimT(vo1)==IdSeqDimT(vo2) ) && \ 00203 (IdSeqType(vo1)==IdSeqType(vo2) ) ) 00204 00205 /* Test d'egalite des dimensions de deux sequences */ 00206 00207 #define IdSeqSameSize(vo1,vo2) ((IdSeqDimX(vo1)==IdSeqDimX(vo2) ) && \ 00208 (IdSeqDimY(vo1)==IdSeqDimY(vo2) ) && \ 00209 (IdSeqDimZ(vo1)==IdSeqDimZ(vo2) ) && \ 00210 (IdSeqDimT(vo1)==IdSeqDimT(vo2) ) ) 00211 00212 /* Test d'egalite du type de deux sequences */ 00213 00214 #define IdSeqSameType(vo1,vo2) (IdSeqType(vo1)==IdSeqType(vo2) ) 00215 00216 #else 00217 PPPPSEQUENCE IdSeqAllocLikeSequence(PPPPSEQUENCE); 00218 int IdSeqSameSizeAndType(PPPPSEQUENCE,PPPPSEQUENCE); 00219 int IdSeqSameSize(PPPPSEQUENCE,PPPPSEQUENCE); 00220 int IdSeqSameType(PPPPSEQUENCE,PPPPSEQUENCE); 00221 #endif 00222 00223 00224 00225 /************************************************************************/ 00226 00227 00228 /* fonctions SEQUENCE */ 00229 00230 PPPPSEQUENCE IdSeqAlloc (int, int, int, int, int); 00231 PPPPSEQUENCE IdSeqAllocSubSequence (PPPPSEQUENCE ,int, int, int, int, 00232 int, int, int ,int); 00233 PPPPSEQUENCE IdSeqModifSubSequence (PPPPSEQUENCE, PPPPSEQUENCE, int, int, 00234 int, int); 00235 #define IdSeqFree(pi) _IdSeqFree((PPPPSEQUENCE*)&(pi) ) 00236 #define IdSeqFreeSubSequence(pi) _IdSeqFreeSubSequence((PPPPSEQUENCE*)&(pi) ) 00237 PPPPSEQUENCE IdSeqTabVolToSequence (PPPVOLUME *,int); 00238 PPPVOLUME * IdSeqSequenceToTabVol (PPPPSEQUENCE); 00239 00240 PPPPSEQUENCE IdSeqClear (PPPPSEQUENCE); 00241 PPPPSEQUENCE_UCHAR IdSeqSetValue (PPPPSEQUENCE_UCHAR,int); 00242 PPPPSEQUENCE IdSeqCopy (PPPPSEQUENCE,PPPPSEQUENCE); 00243 PPPPSEQUENCE IdSeqCast (PPPPSEQUENCE,PPPPSEQUENCE); 00244 PPPPSEQUENCE IdSeqCastReal (PPPPSEQUENCE,PPPPSEQUENCE); 00245 PPPPSEQUENCE IdSeqCastComplex (PPPPSEQUENCE,PPPPSEQUENCE); 00246 00247 PPPPSEQUENCE IdSeqCheckTypeSizeAlloc (PPPPSEQUENCE,int,PPPPSEQUENCE); 00248 PPPPSEQUENCE IdSeqCheckSizeAlloc (PPPPSEQUENCE,int,PPPPSEQUENCE); 00249 PPPPSEQUENCE IdSeqCheckTypeAlloc (PPPPSEQUENCE,int,PPPPSEQUENCE); 00250 PPPPSEQUENCE IdSeqCheckSizeAllocType (PPPPSEQUENCE,int,PPPPSEQUENCE,int); 00251 PPPPSEQUENCE IdSeqCheckTypeAllocSize (PPPPSEQUENCE,int,PPPPSEQUENCE,int,int, 00252 int,int); 00253 void IdSeqSwap (PPPPSEQUENCE,int); 00254 PPPPSEQUENCE IdSeqReadRawFile (char *,int,int,int,int,int); 00255 int IdSeqReadRawFileToSeq (char *, PPPPSEQUENCE); 00256 PPPPSEQUENCE IdSeqReadRawFileWithOffset (char *,int,int,int,int,int,int); 00257 int IdSeqReadRawFileToSeqWithOffset (char *, PPPPSEQUENCE, int); 00258 int IdSeqWriteRawFile(char *, PPPPSEQUENCE); 00259 00260 00261 /* RIEN DE TOUT CA N'EST FAIT .... 00262 * 00263 * PPPSEQUENCE_UCHAR IdSeqRecadTo8 (PPPPSEQUENCE,PPPPSEQUENCE_UCHAR, 00264 * double,double); 00265 * PPPPSEQUENCE * IdSeqSequenceToTabVol (PPPPSEQUENCE); 00266 * 00267 */ 00268 00269 #endif 00270 00271 00272 /* FUNCTION DESCRIPTION ************************************************** 00273 00274 IdSeqDimX (macro) 00275 00276 RESUME: Donne la taille sur l'axe X de la Sequence LibIDO consideree. 00277 00278 DESCRIPTION: Donne la taille sur l'axe X de la Sequence LibIDO consideree. 00279 00280 SYNTAXE: int dimx = IdSeqDimX ( PPPPSEQUENCE seq); 00281 00282 RETOUR: type : int 00283 role : taille en X de la sequence. 00284 00285 PARAMETRES: nom : seq 00286 type : objet sequence LibIDO 00287 role : sequence LibIDO a scruter 00288 00289 FICHIER: idseq.h 00290 00291 EXEMPLE: 00292 00293 ******************************************************** END DESCRIPTION */ 00294 00295 /* FUNCTION DESCRIPTION ************************************************** 00296 00297 IdSeqDimT (macro) 00298 00299 RESUME: Donne la taille sur l'axe T de la Sequence LibIDO considereee. 00300 00301 DESCRIPTION: Donne la taille sur l'axe T de la Sequence LibIDO considereee. 00302 00303 SYNTAXE: int dimT= IdSeqDimT ( PPPPSEQUENCE seq); 00304 00305 RETOUR: type : int 00306 role : taille en T de la sequence. 00307 00308 PARAMETRES: nom : seq 00309 type : objet sequence LibIDO 00310 role : sequence LibIDO a scruter 00311 00312 FICHIER: idseq.h 00313 00314 EXEMPLE: 00315 00316 ******************************************************** END DESCRIPTION */ 00317 00318 00319 /* FUNCTION DESCRIPTION ************************************************** 00320 00321 IdSeqDimY (macro) 00322 00323 RESUME: Donne la taille sur l'axe Y de la Sequence LibIDO considereee. 00324 00325 DESCRIPTION: Donne la taille sur l'axe Y de la Sequence LibIDO considereee. 00326 00327 SYNTAXE: int dimY= IdSeqDimY (PPPPSEQUENCE seq); 00328 00329 RETOUR: type : int 00330 role : taille en Y de la sequence. 00331 00332 PARAMETRES: nom : seq 00333 type : objet sequence LibIDO 00334 role : sequence LibIDO a scruter 00335 00336 FICHIER: idseq.h 00337 00338 EXEMPLE: 00339 00340 ******************************************************** END DESCRIPTION */ 00341 00342 00343 /* FUNCTION DESCRIPTION ************************************************** 00344 00345 IdSeqDimZ (macro) 00346 00347 RESUME: Donne la taille sur l'axe Z de la Sequence LibIDO consideree. 00348 00349 DESCRIPTION: Donne la taille sur l'axe Z de la Sequence LibIDO consideree. 00350 00351 SYNTAXE: int dimz= IdSeqDimZ (PPPPSEQUENCE seq); 00352 00353 RETOUR: type : int 00354 role : taille en Z de la sequence. 00355 00356 PARAMETRES: nom : seq 00357 type : objet sequence LibIDO 00358 role : sequence LibIDO a scruter 00359 00360 FICHIER: idseq.h 00361 00362 EXEMPLE: 00363 00364 ******************************************************** END DESCRIPTION */ 00365 00366 00367 /* FUNCTION DESCRIPTION ************************************************** 00368 00369 IdSeqGetUsedNbX (macro) 00370 00371 RESUME: Donne le nombre de pixels UTILISES sur l'axe x (horizontal) d'une Sequence. 00372 00373 DESCRIPTION: Donne le nombre de pixels UTILISES sur l'axe x (horizontal) d'une Sequence. 00374 00375 SYNTAXE: int dimx = IdSeqGetUsedNbX (PPPPSEQUENCE Sequence); 00376 00377 RETOUR: type : int 00378 role : taille en x de l'Sequence 00379 00380 PARAMETRES: nom : Sequence 00381 type : objet Sequence Libido 00382 role : Sequence LibIDO a scruter. 00383 00384 FICHIER: idseq.h 00385 00386 EXEMPLE: 00387 00388 ******************************************************** END DESCRIPTION */ 00389 00390 /* FUNCTION DESCRIPTION ************************************************** 00391 00392 IdSeqGetUsedNbY (macro) 00393 00394 RESUME: Donne le nombre de pixels UTILISES sur l'axe y (vertical) d'une Sequence. 00395 00396 DESCRIPTION: Donne le nombre de pixels UTILISES sur l'axe y (vertical) d'une Sequence. 00397 00398 SYNTAXE: int dimy = IdSeqGetUsedNby (PPPPSEQUENCE Sequence); 00399 00400 RETOUR: type : int 00401 role : taille en y de l'Sequence 00402 00403 PARAMETRES: nom : Sequence 00404 type : objet Sequence Libido 00405 role : Sequence LibIDO a scruter. 00406 00407 FICHIER: idseq.h 00408 00409 EXEMPLE: 00410 00411 ******************************************************** END DESCRIPTION */ 00412 00413 /* FUNCTION DESCRIPTION ************************************************** 00414 00415 IdSeqGetUsedNbZ (macro) 00416 00417 RESUME: Donne le nombre de pixels UTILISES sur l'axe z d'une Sequence. 00418 00419 DESCRIPTION: Donne le nombre de pixels UTILISES sur l'axe z d'une Sequence. 00420 00421 SYNTAXE: int dimZ = IdSeqGetUsedNbZ (PPPPSEQUENCE Sequence); 00422 00423 RETOUR: type : int 00424 role : taille en Z de la Sequence 00425 00426 PARAMETRES: nom : Sequence 00427 type : objet Sequence Libido 00428 role : Sequence LibIDO a scruter. 00429 00430 FICHIER: idseq.h 00431 00432 EXEMPLE: 00433 00434 ******************************************************** END DESCRIPTION */ 00435 00436 /* FUNCTION DESCRIPTION ************************************************** 00437 00438 IdSeqGetUsedNbT (macro) 00439 00440 RESUME: Donne le nombre de pixels UTILISES sur l'axe t d'une Sequence. 00441 00442 DESCRIPTION: Donne le nombre de pixels UTILISES sur l'axe t d'une Sequence. 00443 00444 SYNTAXE: int dimT = IdSeqGetUsedNbZ (PPPPSEQUENCE Sequence); 00445 00446 RETOUR: type : int 00447 role : taille en T de la Sequence 00448 00449 PARAMETRES: nom : Sequence 00450 type : objet Sequence Libido 00451 role : Sequence LibIDO a scruter. 00452 00453 FICHIER: idseq.h 00454 00455 EXEMPLE: 00456 00457 ******************************************************** END DESCRIPTION */ 00458 00459 00460 /* FUNCTION DESCRIPTION ************************************************** 00461 00462 IdSeqSetUsedNbX (macro) 00463 00464 RESUME: Positionne le nombre de pixels UTILISES sur l'axe x (horizontal) d'une Sequence. 00465 00466 DESCRIPTION: Positionne le nombre de pixels UTILISES sur l'axe x (horizontal) d'une Sequence. A MANIER AVEC PRECAUTION !!! 00467 00468 SYNTAXE: IdSeqSetUsedNbX (PPPPSEQUENCE Sequence, int nbXUtilises); 00469 00470 RETOUR: rien 00471 00472 PARAMETRES: nom : Sequence 00473 type : objet Sequence Libido 00474 role : Sequence LibIDO a scruter. 00475 00476 nom : nbXUtilises 00477 type : int 00478 role : nb pts UTILISES en x. 00479 00480 FICHIER: idseq.h 00481 00482 EXEMPLE: 00483 00484 ******************************************************** END DESCRIPTION */ 00485 00486 00487 /* FUNCTION DESCRIPTION ************************************************** 00488 00489 IdSeqSetUsedNbY (macro) 00490 00491 RESUME: Positionne le nombre de pixels UTILISES sur l'axe y (vertical) d'une Sequence. 00492 00493 DESCRIPTION: Positionne le nombre de pixels UTILISES sur l'axe y (vertical) d'une Sequence. A MANIER AVEC PRECAUTION !!! 00494 00495 SYNTAXE: IdSeqSetUsedNbY (PPPPSEQUENCE Sequence, int nbYUtilises); 00496 00497 RETOUR: rien 00498 00499 PARAMETRES: nom : Sequence 00500 type : objet Sequence Libido 00501 role : Sequence LibIDO a scruter. 00502 00503 nom : nbXUtilises 00504 type : int 00505 role : nb pts UTILISES en y. 00506 00507 FICHIER: idseq.h 00508 00509 EXEMPLE: 00510 00511 ******************************************************** END DESCRIPTION */ 00512 00513 00514 /* FUNCTION DESCRIPTION ************************************************** 00515 00516 IdSeqSetUsedNbZ (macro) 00517 00518 RESUME: Positionne le nombre de pixels UTILISES sur l'axe z d'une Sequence. 00519 00520 DESCRIPTION: Positionne le nombre de pixels UTILISES sur l'axe z d'une Sequence. A MANIER AVEC PRECAUTION !!! 00521 00522 SYNTAXE: IdSeqSetUsedNbZ (PPPPSEQUENCE Sequence, int nbZUtilises); 00523 00524 RETOUR: rien 00525 00526 PARAMETRES: nom : Sequence 00527 type : objet Sequence Libido 00528 role : Sequence LibIDO a scruter. 00529 00530 nom : nbXUtilises 00531 type : int 00532 role : nb pts UTILISES en Z. 00533 00534 FICHIER: idseq.h 00535 00536 EXEMPLE: 00537 00538 ******************************************************** END DESCRIPTION */ 00539 00540 /* FUNCTION DESCRIPTION ************************************************** 00541 00542 IdSeqSetUsedNbT (macro) 00543 00544 RESUME: Positionne le nombre de pixels UTILISES sur l'axe t d'une Sequence. 00545 00546 DESCRIPTION: Positionne le nombre de pixels UTILISES sur l'axe t d'une Sequence. A MANIER AVEC PRECAUTION !!! 00547 00548 SYNTAXE: IdSeqSetUsedNbT (PPPPSEQUENCE Sequence, int nbZUtilises); 00549 00550 RETOUR: rien 00551 00552 PARAMETRES: nom : Sequence 00553 type : objet Sequence Libido 00554 role : Sequence LibIDO a scruter. 00555 00556 nom : nbXUtilises 00557 type : int 00558 role : nb pts UTILISES en T. 00559 00560 FICHIER: idseq.h 00561 00562 EXEMPLE: 00563 00564 ******************************************************** END DESCRIPTION */ 00565 00566 00567 /* FUNCTION DESCRIPTION ************************************************** 00568 00569 IdSeqType (macro) 00570 00571 RESUME: Donne le type d'une sequence LibIDO 00572 00573 DESCRIPTION: Donne le type d'une sequence LibIDO 00574 00575 SYNTAXE: int typ_seq = IdSeqType (PPPPSEQUENCE seq); 00576 00577 RETOUR: type : int 00578 acces : O 00579 role : Type de la Sequence LibIDO. #defini par le tableau suivant : 00580 00581 #define SEQ_CHAR (SEQ | TY_CHAR) 00582 #define SEQ_UCHAR (SEQ | TY_UCHAR) 00583 #define SEQ_SHORT (SEQ | TY_SHORT) 00584 #define SEQ_USHORT (SEQ | TY_USHORT) 00585 #define SEQ_LONG (SEQ | TY_LONG) 00586 #define SEQ_FLOAT (SEQ | TY_FLOAT) 00587 #define SEQ_DOUBLE (SEQ | TY_DOUBLE) 00588 #define SEQ_COMPLEX (SEQ | TY_COMPLEX) 00589 #define SEQ_RGB (SEQ | TY_RGB) 00590 #define SEQ_COMPLEX_DOUBLE (SEQ | TY_COMPLEX_DOUBLE) 00591 #define SEQ_COMPLEX_FLOAT (SEQ | TY_COMPLEX_FLOAT ) 00592 #define SEQ_COMPLEX_CHAR (SEQ | TY_COMPLEX_CHAR ) 00593 #define SEQ_COMPLEX_UCHAR (SEQ | TY_COMPLEX_UCHAR ) 00594 #define SEQ_COMPLEX_SHORT (SEQ | TY_COMPLEX_SHORT ) 00595 #define SEQ_COMPLEX_USHORT (SEQ | TY_COMPLEX_USHORT) 00596 #define SEQ_COMPLEX_LONG (SEQ | TY_COMPLEX_LONG ) 00597 #define SEQ_BIT (SEQ | TY_BIT ) 00598 00599 PARAMETRES: nom : seq 00600 type : Objet sequence LibIDO 00601 role : Sequence LibIDO a scruter. 00602 00603 FICHIER: idseq.h 00604 00605 ******************************************************** END DESCRIPTION */ 00606 00607 00608 /* DEFINITION DESCRIPTION ************************************************** 00609 00610 idseq.h (constantes) 00611 00612 RESUME: constantes SEQ_??? pour definir le type de voxel des sequences a allouer 00613 00614 DESCRIPTION : constantes SEQ_??? utilisees dans les fonctions d'allocation 00615 de sequences permettant de definir le type des voxels. 00616 00617 : IdSeqAlloc, IdSeqType, IdLibidoDataType. 00618 00619 : SEQ_CHAR : SEQ_DOUBLE : SEQ_COMPLEX_UCHAR : 00620 : SEQ_UCHAR : SEQ_COMPLEX : SEQ_COMPLEX_SHORT : 00621 : SEQ_SHORT : SEQ_RGB : SEQ_COMPLEX_USHORT : 00622 : SEQ_USHORT : SEQ_COMPLEX_DOUBLE : SEQ_COMPLEX_LONG : 00623 : SEQ_LONG : SEQ_COMPLEX_FLOAT : SEQ_BIT : 00624 : SEQ_FLOAT : SEQ_COMPLEX_CHAR : 00625 00626 Chaque type (ie UCHAR) est decrit dans : IdLibidoDataType 00627 00628 ******************************************************** END DESCRIPTION */ 00629 00630 00631 /* DEFINITION DESCRIPTION ************************************************** 00632 00633 idseq.h (types) 00634 00635 RESUME: types predefinis des sequences (associes a IdLibidoDataType) 00636 00637 DEFINITION : types predefinis pour l'allocation des sequences, associes aux types 00638 predefinis par IdLibidoDataType. 00639 00640 : IdSeqAlloc, IdLibidoDataType. 00641 00642 : PPPPSEQUENCE : PPPPSEQUENCE_RGB : PPPPSEQUENCE_COMPLEX_CHAR : 00643 : PPPPSEQUENCE_CHAR : PPPPSEQUENCE_SHORT : PPPPSEQUENCE_COMPLEX_UCHAR : 00644 : PPPPSEQUENCE_UCHAR : PPPPSEQUENCE_USHORT : PPPPSEQUENCE_COMPLEX_SHORT : 00645 : PPPPSEQUENCE_FLOAT : PPPPSEQUENCE_LONG : PPPPSEQUENCE_COMPLEX_USHORT : 00646 : PPPPSEQUENCE_DOUBLE : PPPPSEQUENCE_COMPLEX_DOUBLE : PPPPSEQUENCE_COMPLEX_LONG : 00647 : PPPPSEQUENCE_COMPLEX : PPPPSEQUENCE_COMPLEX_FLOAT : PPPPPPSEQUENCE_BIT : 00648 00649 PPPPSEQUENCE seul est de type void. 00650 00651 ******************************************************** END DESCRIPTION */ 00652 00653 00654 /* FUNCTION DESCRIPTION ************************************************** 00655 00656 IdSeqGetBit (macro) 00657 00658 RESUME: Retourne la valeur du voxel de coordonnees x,y,z,b. 00659 00660 DESCRIPTION: Retourne la valeur du voxel de coordonnees x,y,z,b. 00661 00662 SYNTAXE: int val = IdSeqGetBit(PPPPSEQUENCE_BIT seq,int x, int y, int z, int b); 00663 00664 RETOUR: type : int 00665 role : 0 ou 1, selon la valeur du bit de la sequence. 00666 00667 PARAMETRES: 00668 nom : seq 00669 type : PPPPSEQUENCE_BIT 00670 role : Sequence de bit. 00671 00672 nom : x, y, z, b 00673 type : int 00674 role : Coordonnees x, y, z, b de la sequence. 00675 00676 FICHIER: idseq.h 00677 00678 ******************************************************** END DESCRIPTION */ 00679 00680 00681 /* FUNCTION DESCRIPTION ************************************************** 00682 00683 IdSeqPutBit (macro) 00684 00685 RESUME: Fixe la valeur d'un voxel d'un sequence binaire (PPPPSEQUENCE_BIT). 00686 00687 DESCRIPTION: Fixe la valeur d'un voxel d'un sequence binaire (PPPPSEQUENCE_BIT). 00688 00689 SYNTAXE: void IdSeqPutBit(PPPPSEQUENCE_BIT seq, int x, int y, int z, int valBit); 00690 00691 RETOUR: type : void 00692 role : non defini. 00693 00694 PARAMETRES: 00695 nom : seq 00696 type : PPPPSEQUENCE_BIT 00697 role : Sequence de bit. 00698 00699 nom : x, y, z 00700 type : int 00701 role : Coordonnees x, y et z de la sequence. 00702 00703 nom : n 00704 type : int 00705 role : Imperativement 0 ou 1, pour regler la valeur du bit. 00706 00707 FICHIER: idseq.h 00708 00709 ******************************************************** END DESCRIPTION */ 00710 00711 /* FUNCTION DESCRIPTION ************************************************** 00712 00713 IdSeqAllocLikeSequence (macro) 00714 00715 RESUME: Alloc. d'1 sequence de memes dimensions et type qu'1 autre 00716 00717 DESCRIPTION: Allocation d'un sequence de memes dimensions et meme type 00718 qu'une autre. 00719 00720 SYNTAXE: PPPPSEQUENCE seq2 = IdSeqAllocLikeSequence (PPPPSEQUENCE seq1); 00721 00722 RETOUR: type : PPPPSEQUENCE 00723 role : Pointeur vers le sequence alloue (a convertir en un type 00724 valide : PPPPSEQUENCE_UCHAR par exemple ). 00725 00726 PARAMETRES: nom : seq1 00727 type : PPPPSEQUENCE, ou PPPPSEQUENCE_??? 00728 role : Pointeur vers le sequence 'modele'. 00729 00730 FICHIER: idseq.h 00731 00732 ******************************************************** END DESCRIPTION */ 00733 00734 /* FUNCTION DESCRIPTION ************************************************** 00735 00736 IdSeqSameSizeAndType (macro) 00737 00738 RESUME: Comparaison du type et des dimensions de deux sequences. 00739 00740 DESCRIPTION: Comparaison du type et des dimensions de deux sequences. 00741 00742 SYNTAXE: int Booleen = IdSeqSameSizeAndType(PPPPSEQUENCE seq1, PPPPSEQUENCE seq2); 00743 00744 RETOUR: type : int 00745 role : Vrai si les deux sequences ont la meme dimension et 00746 le meme type. 00747 00748 PARAMETRES: nom : seq1, seq2 00749 type : PPPPSEQUENCE, ou PPPPSEQUENCE_??? 00750 role : Pointeurs vers les sequences a comparer. 00751 00752 FICHIER : idseq.h 00753 00754 ******************************************************** END DESCRIPTION */ 00755 00756 /* FUNCTION DESCRIPTION ************************************************** 00757 00758 IdSeqSameSize (macro) 00759 00760 RESUME: Comparaison des dimensions de deux sequences. 00761 00762 DESCRIPTION: Comparaison des dimensions de deux sequences. 00763 00764 SYNTAXE: int Booleen = IdSeqSameSize(PPPPSEQUENCE seq1, PPPPSEQUENCE seq2); 00765 00766 RETOUR: type : int 00767 role : Vrai si les deux sequences ont les memes dimensions 00768 00769 PARAMETRES: nom : seq1, seq2 00770 type : PPPPSEQUENCE, ou PPPPSEQUENCE_??? 00771 role : Pointeurs vers les sequences a comparer. 00772 00773 FICHIER : idseq.h 00774 00775 ******************************************************** END DESCRIPTION */ 00776 00777 /* FUNCTION DESCRIPTION ************************************************** 00778 00779 IdSeqSameType (macro) 00780 00781 RESUME: Comparaison des types de deux sequences. 00782 00783 DESCRIPTION: Comparaison des types de deux sequences. 00784 00785 SYNTAXE: int Booleen = IdSeqSameType(PPPPSEQUENCE seq1, PPPPSEQUENCE seq2); 00786 00787 RETOUR: type : int 00788 role : Vrai si les deux sequences ont le meme type 00789 00790 PARAMETRES: nom : seq1, seq2 00791 type : PPPPSEQUENCE, ou PPPPSEQUENCE_??? 00792 role : Pointeurs vers les sequences a comparer. 00793 00794 FICHIER : idseq.h 00795 00796 ******************************************************** END DESCRIPTION */