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

Object creation and manipulation


Functions

PPPVOLUME_UCHAR ReadLabelVolume (char *filein, int x, int y, int z)
 Read a uchar volume asscoiated to ki label.

PPPVOLUME_UCHAR GetVolumeVOI (PPPVOLUME_UCHAR label, int px, int py, int pz, int dimx, int dimy, int dimz)
 Allocate and get a volume of interest (VOI) within a given volume of ki labels.

OBJECT3DLabelToObject (PPPVOLUME_UCHAR label, PPIMAGE_FLOAT value)
 Create un object from a volume of label and physical values.

PPIMAGE_FLOAT GetBrainPhysicalValues (double B0)
 Define physical values of brain tissue types Ref : Yoder et al. SPIE MEdical Imaging 2002 10 tissues are considered with the following description label / name / Ro / Ro standard deviation / T1 / T1sd / T2 / T2sd / Ki / Kisd 0 /Air/0/0 /0/0 /0/0 /0/0 1 /CSF/2569/ /329/ /1/ /-9.05/ / 2 /Grey Matter/833/ /83/ /0.86/ /-9.05/ / 3 /White Matter/500/ /70/ /0.77/ /-9.05/ / 4 /Fat/350/ /70/ /1/ /-7.5/ / 5 /Muscle/900/ /47/ /1/ /-9.5/ / 6 /Skin/2569/ /329/ /1/ /-9.05/ / 7 /Skull/0/0/0/0/0/0/-8.86/ / 8 /Glial Matter/833/ /83/ /0.86/ /-9.05/ / 9 /Connective/500/ /70/ /0.77/ /-9.05/ /.

OBJECT3DCreateObjectBiComponent1D (int nx)
 Create a 1D object with three parts having linear variation of (ro, t1,t2) fro the water and fat component.

OBJECT3DCreateObjectBiComponent2DCircle (int nx, int ny)
 Create a 2D virtual object with one circle of wat, surrounded by a ring of water.

OBJECT3DCreateObjectBiComponent2DCircleEllipse (int nx, int ny)
 Create a 2D virtual object with one circle of water on the top left, and one ellipse of fat at bottom right.

OBJECT3DCreateObjectBiComponent3DSphere (int nx, int ny, int nz)
 Create an object with a samll sphere of fat within a larger one of water.

OBJECT3DCreateObject3DSphereEllipse (int nx, int ny, int nz)
 Create an object with a sphere of water and an ellipse of water.

void SetObjectSphereComponent (OBJECT3D *object, int radius, int dimx, int dimy, int dimz, int ox, int oy, int oz, int t1s, int t2s, int ros, int t1b, int t2b, int rob, int fill_all, int component)
 Define an homogeneous sphere of one component within an object.

void SetObjectEllipseComponent (OBJECT3D *object, int rx, int ry, int rz, int dimx, int dimy, int dimz, int ox, int oy, int oz, int t1s, int t2s, int ros, int t1b, int t2b, int rob, int fill_all, int component)
 Define an homogeneous ellipse of one component within an object.

void SetObjectFieldDefault1D (OBJECT3D *object, int posy, int posz, PPPVOLUME_FLOAT dech, int dimx)
 Set the field default value for a 1D object Values are given in tesla and normalised for a 1 Tesla B0 field.

void SetObjectFieldDefault2D (OBJECT3D *object, int pos, PPPVOLUME_FLOAT dech, int dimx, int dimy)
 Set the field default value for a 2D object Values are given in tesla and normalised for a 1 Tesla B0 field.

void SetObjectFieldDefault3D (OBJECT3D *object, PPPVOLUME_FLOAT dech, int dimx, int dimy, int dimz)
 Set the field default value for a 3D object Values are given in tesla and normalised for a 1 Tesla B0 field.

void SetObjectFieldDefault (OBJECT3D *object, PPPVOLUME_FLOAT dech)
 Set the field default value of an object.

PPPVOLUME_FLOAT GetParamFromDataFile (char *filein, PSIGNAL_FLOAT datatab)
 Allocate and set vales of a Float volume regarding a volume of unsigned char label and a table that gives the values associated to the label.

OBJECT3DCreateObject3DSphereKi (int dimx, int dimy, int dimz)
 Create an object which is a 3D homogeneous sphere in ro t1 t2 ki.

OBJECT3DCreateObject2DCircleKi (int dimx, int dimy)
 Create an object which is a 2D homogeneous circle in ro t1 t2 ki (part of a sphere).

OBJECT3DCreateObject1DSectionKi (int dimx)
 Create an object which is a 1D homogeneous segment in ro t1 t2 ki (part of a sphere).

OBJECT3DCreateObject2DKi (float RoExt, float RoInt, float T1Ext, float T1Int, float T2Ext, float T2Int, float KiExt, float KiInt, int dimx, int dimy, char *filelabel, char *filedech)
 Create an object with two regions homogeneous in ro, t1, t2, ki values.

OBJECT3DCreateHomogeneousObject (int dimx, int dimy, int dimz, int t1, int t2, int ro)
 Create an ro,t1, t2 homogeneous object of one component.

void SetSphericalObject (OBJECT3D *object, int radius, int dimx, int dimy, int dimz, int ox, int oy, int oz, int t1s, int t2s, int ros, int t1b, int t2b, int rob, int fill_all)
 Set an homogeneous sphere within an object.

OBJECT3DCreateSphericalObject (int radius, int dimx, int dimy, int dimz, int ox, int oy, int oz, int t1s, int t2s, int ros, int t1b, int t2b, int rob, int fill_all)
 Create a spherical object with homogeneous ro, T1, t2 values.

void SetEllipticalObject (OBJECT3D *object, int rx, int ry, int rz, int dimx, int dimy, int dimz, int ox, int oy, int oz, int t1s, int t2s, int ros, int t1b, int t2b, int rob, int fill_all)
 Set an homogeneous ellipse within an object.

OBJECT3DCreateEllipticalObject (int rx, int ry, int rz, int dimx, int dimy, int dimz, int ox, int oy, int oz, int t1s, int t2s, int ros, int t1b, int t2b, int rob, int fill_all)
 Create an homogeneous elliptical object.

void SetSphericalCylindricObject (OBJECT3D *object, int radius, int dimx, int dimy, int dimz, int ox, int oy, int t1s, int t2s, int ros, int t1b, int t2b, int rob, int fill_all)
 Set an homogeneous spherical cylinder within an object.

void SetEllipticalCylindricObject (OBJECT3D *object, int rx, int ry, int dimx, int dimy, int dimz, int ox, int oy, int t1s, int t2s, int ros, int t1b, int t2b, int rob, int fill_all)
 Set an homogeneous elliptical cylinder within an object.

void ClearZplane (OBJECT3D *object, int first, int last, int dimx, int dimy, int dimz)
 Clear a set of planes in an object.

void SetLinearObject1D (OBJECT3D *object, int rodeb, int rofin, int t1deb, int t1fin, int t2deb, int t2fin, int xdeb, int xfin, int component)
 Set a linear variation of the ro, t1, t2, values in the object.

OBJECT3DCreate2DTestObjectCircleEllipseSquare (int nx, int ny)
 Create a 2D test object with a circle at the left top, an ellipse at the right botom, and a square at the center.

OBJECT3DCreate2DTestObjectRectangleRoGradient (int nx, int ny, int lx, int ly)
 Create a 2D object with a rectangle presenting a linear gradient of proton density.

OBJECT3DGetTestObject2D (int obj, int x, int y, double db0)
 Create a 2D object for testing a sequence.

OBJECT3DGetTestObject3D (int obj, int x, int y, int z, double db0)
 Create a 3D object for testing a sequence.

void SaveObjectAsVolFloat (OBJECT3D *object)
 Save a virtual object within a set of float volumes.

OBJECT3DAllocObject (int x, int y, int z, int nbcomp, int nbparam)
 Virtual object allocation.

void FreeObject (OBJECT3D *object)
 Object free.

void SetObjectSize (OBJECT3D *object, float lx, float ly, float lz)
 Define the size in meter of a virtual object.

void SetObjectActiveComponent (OBJECT3D *object, int component)
 Define the component that will be considered for acquisition.

void SetObjectDeltaB0 (OBJECT3D *object, double deltab0)
 Set the T2* weight by definig an intra spin deltab0 value For now, this value is constant all over the volume.

void SetObjectChemicalShift (OBJECT3D *object, float edw, int component)
 Fix the chemical shift value of each component.

void SetObjectPoint (OBJECT3D *object, int x, int y, int z, int ro, int t1, int t2, int component)
 Set the ro t1 t2 values of one point (voxel) of an object component.

void WriteObject (OBJECT3D *object, char *name)
 Save an object within a file.

OBJECT3DReadObject (char *name)
 Allocate and read a virtual object from file.


Function Documentation

OBJECT3D* AllocObject int  x,
int  y,
int  z,
int  nbcomp,
int  nbparam
 

Virtual object allocation.

Warning:
A default size of 1mx1mx1m is given
Parameters:
x Number of voxels on the x dimension
y Number of voxels on the y dimension
z Number of voxels on the z dimension
ncomp Number of components
nbparam Number of physical values by component
Returns:
Pointer on the alocated object

Definition at line 262 of file object.c.

References IdSeqAlloc(), IdSigAlloc(), IdVolAlloc(), object, OBJECT3D, PPPPSEQUENCE_USHORT, PPPVOLUME_FLOAT, PSIGNAL_FLOAT, SEQ_USHORT, SIG_FLOAT, VOL_FLOAT, and x.

Referenced by Create2DTestObjectCircleEllipseSquare(), Create2DTestObjectRectangleRoGradient(), CreateEllipticalObject(), CreateHomogeneousObject(), CreateObject1DSectionKi(), CreateObject2DCircleKi(), CreateObject2DKi(), CreateObject3DSphereEllipse(), CreateObject3DSphereKi(), CreateObjectBiComponent1D(), CreateObjectBiComponent2DCircle(), CreateObjectBiComponent2DCircleEllipse(), CreateObjectBiComponent3DSphere(), CreateSphericalObject(), LabelToObject(), and ReadObject().

void ClearZplane OBJECT3D object,
int  first,
int  last,
int  dimx,
int  dimy,
int  dimz
 

Clear a set of planes in an object.

Parameters:
object Pointer on the object
first Fisrt plane
last Last plane
dimx x object size in voxel
dimy y object size in voxel
dimz z object size in voxel

Definition at line 381 of file object-simple.c.

References object, SetObjectPoint(), and WATER.

OBJECT3D* Create2DTestObjectCircleEllipseSquare int  nx,
int  ny
 

Create a 2D test object with a circle at the left top, an ellipse at the right botom, and a square at the center.

Warning:
Only for the component 0, WATER
Parameters:
nx x object dimension in voxels
ny y object dimension in voxels
Returns:
object Pointer on the object

Definition at line 435 of file object-simple.c.

References AllocObject(), object, OBJECT3D, SetObjectPoint(), and WATER.

Referenced by GetTestObject2D().

OBJECT3D* Create2DTestObjectRectangleRoGradient int  nx,
int  ny,
int  lx,
int  ly
 

Create a 2D object with a rectangle presenting a linear gradient of proton density.

Parameters:
nx x object dimension in voxels
ny y object dimension in voxels
lx x rectangle dimension
ly y rectangle dimension
Returns:
object Pointer on the object

Definition at line 493 of file object-simple.c.

References AllocObject(), object, OBJECT3D, SetObjectPoint(), and WATER.

OBJECT3D* CreateEllipticalObject int  rx,
int  ry,
int  rz,
int  dimx,
int  dimy,
int  dimz,
int  ox,
int  oy,
int  oz,
int  t1s,
int  t2s,
int  ros,
int  t1b,
int  t2b,
int  rob,
int  fill_all
 

Create an homogeneous elliptical object.

Parameters:
rx x radius of the ellipse
ry y radius of the ellipse
rz z radius of the ellipese
dimx x object size in voxel
dimy y object size in voxel
dimz z object size in voxel
ox Ellipse centre position along x
oy Ellipse centre position along y
oz Ellipse centre position along z
t1s t1 value inside the ellipse
t2s t2 value inside the ellipse
ros ro value inside the ellipse
t1b t1 value outside the ellipse
t2b t2 value outside the ellipse
rob ro value outside the ellipse
fill_all Filling the outside of the ellipse (1=yes / 0=No)
Returns:
Pointer on the object

Definition at line 242 of file object-simple.c.

References AllocObject(), object, OBJECT3D, and SetEllipticalObject().

OBJECT3D* CreateHomogeneousObject int  dimx,
int  dimy,
int  dimz,
int  t1,
int  t2,
int  ro
 

Create an ro,t1, t2 homogeneous object of one component.

Parameters:
dimx x size in voxels
dimy y size in voxels
dimz z size in voxels
t1 t1 value
t2 t2 value
ro ro value
Returns:
Pointer on the object

Definition at line 56 of file object-simple.c.

References AllocObject(), object, OBJECT3D, SetObjectPoint(), and WATER.

Referenced by TestEchoGradient1D(), TestEchoSpin1D(), TestFID1D(), TestSimulatedEcho(), TestTrainEchoGradient1D(), and TestTrainEchoSpin1D().

OBJECT3D* CreateObject1DSectionKi int  dimx  ) 
 

Create an object which is a 1D homogeneous segment in ro t1 t2 ki (part of a sphere).

Warning:
The filemane containing the region label and the field default values linked to the susceptibility difference are hard written in the code :"../data/hightresolution.vol" and "../data/Defchamps.vol"
Parameters:
dimx Number of object pixels along x
Returns:
Pointeur on the created object*************************************************

Definition at line 372 of file object-ki.c.

References AllocInitVectFloat(), AllocObject(), GetParamFromDataFile(), IdAcrReadFile(), IdVectFree, IdVolFree, OBJECT3D, PPPVOLUME_FLOAT, PVECTOR_FLOAT, SetObjectFieldDefault1D(), SetObjectPointSusceptibility(), and VOL_FLOAT.

OBJECT3D* CreateObject2DCircleKi int  dimx,
int  dimy
 

Create an object which is a 2D homogeneous circle in ro t1 t2 ki (part of a sphere).

Warning:
The filemane containing the region label and the field default values linked to the susceptibility difference are hard written in the code :"../data/sphere_64_10.vol" and "../data/Defchamps_sphere_64_10.vol"
Parameters:
dimx Number of object pixels along x
dimy Number of object pixels along y
Returns:
Pointeur on the created object

Definition at line 293 of file object-ki.c.

References AllocInitVectFloat(), AllocObject(), GetParamFromDataFile(), IdAcrReadFile(), IdVectFree, IdVolFree, OBJECT3D, PPPVOLUME_FLOAT, PVECTOR_FLOAT, SetObjectFieldDefault2D(), SetObjectPointSusceptibility(), and VOL_FLOAT.

Referenced by GetTestObject2D().

OBJECT3D* CreateObject2DKi float  RoExt,
float  RoInt,
float  T1Ext,
float  T1Int,
float  T2Ext,
float  T2Int,
float  KiExt,
float  KiInt,
int  dimx,
int  dimy,
char *  filelabel,
char *  filedech
 

Create an object with two regions homogeneous in ro, t1, t2, ki values.

Warning:
Parameters:
dimx Number of object pixels along x
dimy Number of object pixels along y
dimz Number of object pixels along z
Returns:
Pointeur on the created object

Definition at line 459 of file object-ki.c.

References AllocInitVectFloat(), AllocObject(), GetParamFromDataFile(), IdAcrReadFile(), IdVectFree, IdVolFree, OBJECT3D, PPPVOLUME_FLOAT, PVECTOR_FLOAT, SetObjectFieldDefault2D(), SetObjectPointSusceptibility(), and VOL_FLOAT.

OBJECT3D* CreateObject3DSphereEllipse int  nx,
int  ny,
int  nz
 

Create an object with a sphere of water and an ellipse of water.

Warning:
Parameters:
nx x object size in pixel
ny y object size in pixel
nz z object size in pixel
Returns:
object Pointer on the created object

Definition at line 268 of file object-compound.c.

References AllocObject(), object, OBJECT3D, SetObjectEllipseComponent(), SetObjectSphereComponent(), and WATER.

Referenced by GetTestObject3D().

OBJECT3D* CreateObject3DSphereKi int  dimx,
int  dimy,
int  dimz
 

Create an object which is a 3D homogeneous sphere in ro t1 t2 ki.

Warning:
The filemane containing the region label and the field default values linked to the susceptibility difference are hard written in the code : 'hightresolution.vol' and 'Defchamps.vol'
Parameters:
dimx Number of object pixels along x
dimy Number of object pixels along y
dimz Number of object pixels along z
Returns:
Pointeur on the created object

Definition at line 218 of file object-ki.c.

References AllocInitVectFloat(), AllocObject(), GetParamFromDataFile(), IdAcrReadFile(), IdVolFree, OBJECT3D, PPPVOLUME_FLOAT, PVECTOR_FLOAT, SetObjectFieldDefault3D(), SetObjectPointSusceptibility(), and VOL_FLOAT.

OBJECT3D* CreateObjectBiComponent1D int  nx  ) 
 

Create a 1D object with three parts having linear variation of (ro, t1,t2) fro the water and fat component.

Warning:
Parameters:
nx x object size in pixel
Returns:
object Pointer on the created object

Definition at line 53 of file object-compound.c.

References AllocObject(), DECFAT, DECWATER, FAT, object, OBJECT3D, SetLinearObject1D(), SetObjectChemicalShift(), and WATER.

OBJECT3D* CreateObjectBiComponent2DCircle int  nx,
int  ny
 

Create a 2D virtual object with one circle of wat, surrounded by a ring of water.

Warning:
Parameters:
nx x object size in pixel
ny y object size in pixel
Returns:
object Pointer on the created object

Definition at line 94 of file object-compound.c.

References AllocObject(), DECFAT, DECWATER, FAT, object, OBJECT3D, SetObjectChemicalShift(), SetObjectPoint(), and WATER.

Referenced by GetTestObject2D().

OBJECT3D* CreateObjectBiComponent2DCircleEllipse int  nx,
int  ny
 

Create a 2D virtual object with one circle of water on the top left, and one ellipse of fat at bottom right.

Warning:
Parameters:
nx x object size in pixel
ny y object size in pixel
Returns:
object Pointer on the created object

Definition at line 169 of file object-compound.c.

References AllocObject(), DECFAT, DECWATER, FAT, object, OBJECT3D, SetObjectChemicalShift(), SetObjectPoint(), and WATER.

OBJECT3D* CreateObjectBiComponent3DSphere int  nx,
int  ny,
int  nz
 

Create an object with a samll sphere of fat within a larger one of water.

Warning:
pour la componentule d'WATER et/ou graisse avec/sans deplacement chimique
Parameters:
nx x object size in pixel
ny y object size in pixel
nz z object size in pixel
Returns:
object Pointer on the created object

Definition at line 228 of file object-compound.c.

References AllocObject(), DECFAT, DECWATER, FAT, object, OBJECT3D, SetObjectChemicalShift(), SetObjectSphereComponent(), and WATER.

Referenced by GetTestObject3D().

OBJECT3D* CreateSphericalObject int  radius,
int  dimx,
int  dimy,
int  dimz,
int  ox,
int  oy,
int  oz,
int  t1s,
int  t2s,
int  ros,
int  t1b,
int  t2b,
int  rob,
int  fill_all
 

Create a spherical object with homogeneous ro, T1, t2 values.

Parameters:
radius Sphere radius
dimx x object size in voxel
dimy y object size in voxel
dimz z object size in voxel
ox Sphere centre position along x
oy Sphere centre position along y
oz Sphere centre position along z
t1s t1 value inside the sphere
t2s t2 value inside the sphere
ros ro value inside the sphere
t1b t1 value outside the sphere
t2b t2 value outside the sphere
rob ro value outside the sphere
fill_all Filling the outside of the sphere (1=yes / 0=No)
Returns:
Pointer on the object

Definition at line 146 of file object-simple.c.

References AllocObject(), object, OBJECT3D, and SetSphericalObject().

Referenced by GetTestObject2D().

void FreeObject OBJECT3D object  ) 
 

Object free.

Parameters:
object Pointer on the object to free

Definition at line 342 of file object.c.

References IdSeqFree, IdSigFree, IdVolFree, and object.

Referenced by TestSequence2D(), and TestSequence3D().

PPIMAGE_FLOAT GetBrainPhysicalValues double  B0  ) 
 

Define physical values of brain tissue types Ref : Yoder et al. SPIE MEdical Imaging 2002 10 tissues are considered with the following description label / name / Ro / Ro standard deviation / T1 / T1sd / T2 / T2sd / Ki / Kisd 0 /Air/0/0 /0/0 /0/0 /0/0 1 /CSF/2569/ /329/ /1/ /-9.05/ / 2 /Grey Matter/833/ /83/ /0.86/ /-9.05/ / 3 /White Matter/500/ /70/ /0.77/ /-9.05/ / 4 /Fat/350/ /70/ /1/ /-7.5/ / 5 /Muscle/900/ /47/ /1/ /-9.5/ / 6 /Skin/2569/ /329/ /1/ /-9.05/ / 7 /Skull/0/0/0/0/0/0/-8.86/ / 8 /Glial Matter/833/ /83/ /0.86/ /-9.05/ / 9 /Connective/500/ /70/ /0.77/ /-9.05/ /.

Parameters:
B0 Static field value (unused at the moment, assumed to be 1T)
Returns:
Image containing the physical set of values

Definition at line 145 of file object-brain.c.

References IdImaAlloc(), IMA_FLOAT, and PPIMAGE_FLOAT.

Referenced by GetTestObject2D().

PPPVOLUME_FLOAT GetParamFromDataFile char *  filein,
PSIGNAL_FLOAT  datatab
 

Allocate and set vales of a Float volume regarding a volume of unsigned char label and a table that gives the values associated to the label.

Parameters:
filein File name of the unsigned char volume of labels
datatab Signal contained the values associated to the label
Warning:
Returns:
Pointer on the volume of values

Definition at line 188 of file object-ki.c.

References data, IdAcrReadFile(), IdVolAlloc(), IdVolDimX, IdVolDimY, IdVolDimZ, IdVolFree, PPPVOLUME_FLOAT, PPPVOLUME_UCHAR, VOL_FLOAT, VOL_UCHAR, and x.

Referenced by CreateObject1DSectionKi(), CreateObject2DCircleKi(), CreateObject2DKi(), and CreateObject3DSphereKi().

OBJECT3D* GetTestObject2D int  obj,
int  x,
int  y,
double  db0
 

Create a 2D object for testing a sequence.

Warning:
Parameters:
obj Object choice given by an integer
x X object size
y Y object size
db0 Intra voxel field default in T (T2* effect)
b0def Maximum value of the main satic field default (Parabolic form)
flagres On/Off resonance flag
filter =1 to activate Hamming filtering of the k space
fileout Reconstructed image name that will be saved
Returns:
a pointer on the correspoding object

Definition at line 62 of file object.c.

References Create2DTestObjectCircleEllipseSquare(), CreateObject2DCircleKi(), CreateObjectBiComponent2DCircle(), CreateSphericalObject(), GetBrainPhysicalValues(), GetVolumeVOI(), IdImaFree, IdVolFree, LabelToObject(), object, OBJECT3D, PPIMAGE_FLOAT, PPPVOLUME_UCHAR, ReadLabelVolume(), SetObjectDeltaB0(), SetObjectSize(), and x.

Referenced by TestSequence2D().

OBJECT3D* GetTestObject3D int  obj,
int  x,
int  y,
int  z,
double  db0
 

Create a 3D object for testing a sequence.

Warning:
Parameters:
obj Object choice given by an integer
x X object size
y Y object size
z Z object size
db0 Intra voxel field default in T (T2* effect)
b0def Maximum value of the main satic field default (Parabolic form)
flagres On/Off resonance flag
filter =1 to activate Hamming filtering of the k space
fileout Reconstructed image name that will be saved
Returns:
a pointer on the correspoding object

Definition at line 158 of file object.c.

References CreateObject3DSphereEllipse(), CreateObjectBiComponent3DSphere(), object, OBJECT3D, SetObjectDeltaB0(), SetObjectSize(), and x.

Referenced by TestSequence3D().

PPPVOLUME_UCHAR GetVolumeVOI PPPVOLUME_UCHAR  label,
int  px,
int  py,
int  pz,
int  dimx,
int  dimy,
int  dimz
 

Allocate and get a volume of interest (VOI) within a given volume of ki labels.

Parameters:
px Starting point on x dimension
py Starting point on y dimension
pz Starting point on z dimension
dimx Number of plane to get along the x dimension
dimy Number of plane to get along the y dimension
dimz Number of plane to get along the z dimension
Returns:
Pointer on the VOI

Definition at line 80 of file object-brain.c.

References IdVolAlloc(), PPPVOLUME_UCHAR, and VOL_UCHAR.

Referenced by GetTestObject2D().

OBJECT3D* LabelToObject PPPVOLUME_UCHAR  label,
PPIMAGE_FLOAT  value
 

Create un object from a volume of label and physical values.

Parameters:
label Volume of label
value Set of phyical values including their variance
Warning:
Returns:
Pointer on the virtual object

Definition at line 101 of file object-brain.c.

References AllocObject(), IdVolDimX, IdVolDimY, IdVolDimZ, object, OBJECT3D, RandGaussian(), SetObjectPoint(), WATER, and x.

Referenced by GetTestObject2D().

PPPVOLUME_UCHAR ReadLabelVolume char *  filein,
int  x,
int  y,
int  z
 

Read a uchar volume asscoiated to ki label.

Parameters:
file File name
x x dimension of the data volume
y y dimension of the data volume
z z dimension of the data volume
Returns:
Pointer on the label volume

Definition at line 54 of file object-brain.c.

References IdVolReadRawFile(), PPPVOLUME_UCHAR, VOL_UCHAR, and x.

Referenced by GetTestObject2D().

OBJECT3D* ReadObject char *  name  ) 
 

Allocate and read a virtual object from file.

Warning:
Some object parameters are not saved in the file, they take their default values
Parameters:
name File name containing the object values
Returns:
Pointer on the object

Definition at line 456 of file object.c.

References AllocObject(), IdAcrReadFile(), IdSeqDimT, IdSeqDimX, IdSeqDimY, IdSeqDimZ, IdSeqFree, object, OBJECT3D, PPPPSEQUENCE_USHORT, SEQ_USHORT, and x.

void SaveObjectAsVolFloat OBJECT3D object  ) 
 

Save a virtual object within a set of float volumes.

Warning:
A maximum of two components (water and fat) is considered for now
Parameters:
object Pointer on the virtual object to save

Definition at line 195 of file object.c.

References IdAcrWriteFile(), IdVolAlloc(), IdVolFree, object, PPPVOLUME_FLOAT, VOL_FLOAT, and x.

void SetEllipticalCylindricObject OBJECT3D object,
int  rx,
int  ry,
int  dimx,
int  dimy,
int  dimz,
int  ox,
int  oy,
int  t1s,
int  t2s,
int  ros,
int  t1b,
int  t2b,
int  rob,
int  fill_all
 

Set an homogeneous elliptical cylinder within an object.

Parameters:
object Pointer on the object
rx Cylinder radius along x
ry Cylinder radius along y
dimx x object size in voxel
dimy y object size in voxel
dimz z object size in voxel
ox Axis position along x
oy Axis position along y
t1s t1 value inside the cylinder
t2s t2 value inside the cylinder
ros ro value inside the cylinder
t1b t1 value outside the cylinder
t2b t2 value outside the cylinder
rob ro value outside the cylinder
fill_all Filling the outside of the cylinder (1=yes / 0=No)

Definition at line 334 of file object-simple.c.

References object, SetObjectPoint(), and WATER.

void SetEllipticalObject OBJECT3D object,
int  rx,
int  ry,
int  rz,
int  dimx,
int  dimy,
int  dimz,
int  ox,
int  oy,
int  oz,
int  t1s,
int  t2s,
int  ros,
int  t1b,
int  t2b,
int  rob,
int  fill_all
 

Set an homogeneous ellipse within an object.

Parameters:
rx x radius of the ellipse
ry y radius of the ellipse
rz z radius of the ellipese
dimx x object size in voxel
dimy y object size in voxel
dimz z object size in voxel
ox Ellipse centre position along x
oy Ellipse centre position along y
t1s t1 value inside the ellipse
t2s t2 value inside the ellipse
ros ro value inside the ellipse
t1b t1 value outside the ellipse
t2b t2 value outside the ellipse
rob ro value outside the ellipse
fill_all Filling the outside of the ellipse (1=yes / 0=No)

Definition at line 184 of file object-simple.c.

References object, SetObjectPoint(), and WATER.

Referenced by CreateEllipticalObject().

void SetLinearObject1D OBJECT3D object,
int  rodeb,
int  rofin,
int  t1deb,
int  t1fin,
int  t2deb,
int  t2fin,
int  xdeb,
int  xfin,
int  component
 

Set a linear variation of the ro, t1, t2, values in the object.

Warning:
for one component WATER or FAT
Parameters:
object Pointer on the object
rodeb ro value on the left side of the object
rofin ro value on the right side of the object
t1deb t1 value on the left side of the object
t1fin t1 value on the right side of the object
t2deb t2 value on the left side of the object
t2fin t2 value on the right side of the object
xdeb Fisrt voxel considered
xfin Last voxel considered
component Component number

Definition at line 408 of file object-simple.c.

References object, and SetObjectPoint().

Referenced by CreateObjectBiComponent1D().

void SetObjectActiveComponent OBJECT3D object,
int  component
 

Define the component that will be considered for acquisition.

Parameters:
object Pointer on thevirtual object
component Component number

Definition at line 375 of file object.c.

References object.

Referenced by RunSequence().

void SetObjectChemicalShift OBJECT3D object,
float  edw,
int  component
 

Fix the chemical shift value of each component.

Parameters:
object Pointer on the object
edw Value (in Hz) of the chemical shift
component Numero de la molecule

Definition at line 405 of file object.c.

References object.

Referenced by CreateObjectBiComponent1D(), CreateObjectBiComponent2DCircle(), CreateObjectBiComponent2DCircleEllipse(), and CreateObjectBiComponent3DSphere().

void SetObjectDeltaB0 OBJECT3D object,
double  deltab0
 

Set the T2* weight by definig an intra spin deltab0 value For now, this value is constant all over the volume.

Parameters:
object Pointer on the object
deltab0 Weight value in Tesla

Definition at line 388 of file object.c.

References object.

Referenced by GetTestObject2D(), GetTestObject3D(), TestEchoGradient1D(), TestEchoSpin1D(), TestFID1D(), TestSimulatedEcho(), TestTrainEchoGradient1D(), and TestTrainEchoSpin1D().

void SetObjectEllipseComponent OBJECT3D object,
int  rx,
int  ry,
int  rz,
int  dimx,
int  dimy,
int  dimz,
int  ox,
int  oy,
int  oz,
int  t1s,
int  t2s,
int  ros,
int  t1b,
int  t2b,
int  rob,
int  fill_all,
int  component
 

Define an homogeneous ellipse of one component within an object.

Parameters:
object Pointer on the object
rx x ellipse radius
ry y ellipse radius
rz z ellipse radius
dimx x ellipse size
dimy y ellipse size
dimz z ellipse size
ox x position of the ellipse
oy y position of the ellipse
oz z position of the ellipse
t1s t1 value in the ellipse
t2s t2 value in the ellipse
ros ro value in the ellipse
t1b t1 value out of the ellipse
t2b t2 value out of the ellipse
rob ro value out of the ellipse
fill_all Set values outside the ellipse: 1 (Yes), 0 (No)
component 0>> Water 1 >> Fat

Definition at line 366 of file object-compound.c.

References object, SetObjectPoint(), and WATER.

Referenced by CreateObject3DSphereEllipse().

void SetObjectFieldDefault OBJECT3D object,
PPPVOLUME_FLOAT  dech
 

Set the field default value of an object.

Parameters:
object Pointer on the objetc
dech Volume of default field values given in Tesla

Definition at line 120 of file object-ki.c.

References IdVolDimX, IdVolDimY, IdVolDimZ, and object.

void SetObjectFieldDefault1D OBJECT3D object,
int  posy,
int  posz,
PPPVOLUME_FLOAT  dech,
int  dimx
 

Set the field default value for a 1D object Values are given in tesla and normalised for a 1 Tesla B0 field.

Parameters:
object Pointer on the virtual object
dech Volume with the field default values in tesla
posy Y position on the default field volume
posz Z position on the default field volume
dimx X dimension of the virtual object

Definition at line 54 of file object-ki.c.

References object.

Referenced by CreateObject1DSectionKi().

void SetObjectFieldDefault2D OBJECT3D object,
int  pos,
PPPVOLUME_FLOAT  dech,
int  dimx,
int  dimy
 

Set the field default value for a 2D object Values are given in tesla and normalised for a 1 Tesla B0 field.

Parameters:
object Pointer on the virtual object
dech Volume with the field default values in tesla
pos Slice position in the default field volume
dimx X dimension of the virtual object
dimy Y dimension of the virtual object

Definition at line 73 of file object-ki.c.

References DisplayImage2D(), IdImaAlloc(), IdImaFree, IdImaRecadTo8(), IMA_FLOAT, IMA_UCHAR, object, PPIMAGE, PPIMAGE_FLOAT, and PPIMAGE_UCHAR.

Referenced by CreateObject2DCircleKi(), and CreateObject2DKi().

void SetObjectFieldDefault3D OBJECT3D object,
PPPVOLUME_FLOAT  dech,
int  dimx,
int  dimy,
int  dimz
 

Set the field default value for a 3D object Values are given in tesla and normalised for a 1 Tesla B0 field.

Parameters:
object Pointer on the virtual object
dech Volume with the field default values in tesla
dimx X dimension of the virtual object
dimy Y dimension of the virtual object
dimy Z dimension of the virtual object

Definition at line 106 of file object-ki.c.

References object.

Referenced by CreateObject3DSphereKi().

void SetObjectPoint OBJECT3D object,
int  x,
int  y,
int  z,
int  ro,
int  t1,
int  t2,
int  component
 

Set the ro t1 t2 values of one point (voxel) of an object component.

Parameters:
object Pointer on the object
x x coordinate
y y coordinate
z z coordinate
ro ro vlue
t1 t1 value
t2 t2 value
component Component number

Definition at line 424 of file object.c.

References object, and x.

Referenced by ClearZplane(), Create2DTestObjectCircleEllipseSquare(), Create2DTestObjectRectangleRoGradient(), CreateHomogeneousObject(), CreateObjectBiComponent2DCircle(), CreateObjectBiComponent2DCircleEllipse(), LabelToObject(), SetEllipticalCylindricObject(), SetEllipticalObject(), SetLinearObject1D(), SetObjectCone(), SetObjectEllipseComponent(), SetObjectSphereComponent(), SetSphericalCylindricObject(), and SetSphericalObject().

void SetObjectSize OBJECT3D object,
float  lx,
float  ly,
float  lz
 

Define the size in meter of a virtual object.

Parameters:
object Pointer on the object
lx x size in meter
ly y size in meter
lz z size in meter Note that the same object could be considered at different sizes

Definition at line 361 of file object.c.

References object.

Referenced by GetTestObject2D(), GetTestObject3D(), TestEchoGradient1D(), TestEchoSpin1D(), TestFID1D(), TestSimulatedEcho(), TestTrainEchoGradient1D(), and TestTrainEchoSpin1D().

void SetObjectSphereComponent OBJECT3D object,
int  radius,
int  dimx,
int  dimy,
int  dimz,
int  ox,
int  oy,
int  oz,
int  t1s,
int  t2s,
int  ros,
int  t1b,
int  t2b,
int  rob,
int  fill_all,
int  component
 

Define an homogeneous sphere of one component within an object.

Parameters:
object Pointer on the object
radius sphere radius
dimx x sphere size
dimy y sphere size
dimz z sphere size
ox x position of the sphere
oy y position of the sphere
oz z position of the sphere
t1s t1 value in the sphere
t2s t2 value in the sphere
ros ro value in the sphere
t1b t1 value out of the sphere
t2b t2 value out of the sphere
rob ro value out of the sphere
fill_all Set values outside the sphere: 1 (Yes), 0 (No)
component 0>> Water 1 >> Fat

Definition at line 309 of file object-compound.c.

References object, and SetObjectPoint().

Referenced by CreateObject3DSphereEllipse(), and CreateObjectBiComponent3DSphere().

void SetSphericalCylindricObject OBJECT3D object,
int  radius,
int  dimx,
int  dimy,
int  dimz,
int  ox,
int  oy,
int  t1s,
int  t2s,
int  ros,
int  t1b,
int  t2b,
int  rob,
int  fill_all
 

Set an homogeneous spherical cylinder within an object.

Parameters:
object Pointer on the object
radius Cylinder radius
dimx x object size in voxel
dimy y object size in voxel
dimz z object size in voxel
ox Axis position along x
oy Axis position along y
t1s t1 value inside the cylinder
t2s t2 value inside the cylinder
ros ro value inside the cylinder
t1b t1 value outside the cylinder
t2b t2 value outside the cylinder
rob ro value outside the cylinder
fill_all Filling the outside of the cylinder (1=yes / 0=No)
Returns:
Pointeur vers l'object

Definition at line 280 of file object-simple.c.

References object, SetObjectPoint(), and WATER.

void SetSphericalObject OBJECT3D object,
int  radius,
int  dimx,
int  dimy,
int  dimz,
int  ox,
int  oy,
int  oz,
int  t1s,
int  t2s,
int  ros,
int  t1b,
int  t2b,
int  rob,
int  fill_all
 

Set an homogeneous sphere within an object.

Parameters:
radius Sphere radius
dimx x object size in voxel
dimy y object size in voxel
dimz z object size in voxel
ox Sphere centre position along x
oy Sphere centre position along y
oz Sphere centre position along z
t1s t1 value inside the sphere
t2s t2 value inside the sphere
ros ro value inside the sphere
t1b t1 value outside the sphere
t2b t2 value outside the sphere
rob ro value outside the sphere
fill_all Filling the outside of the sphere (1=yes / 0=No)

Definition at line 91 of file object-simple.c.

References object, SetObjectPoint(), and WATER.

Referenced by CreateSphericalObject().

void WriteObject OBJECT3D object,
char *  name
 

Save an object within a file.

Warning:
Only the param values are saved, not the size; the deltaB0 ...
Parameters:
object Pointer on the virtual object
name file name

Definition at line 443 of file object.c.

References IdAcrWriteFile(), object, and PPPPSEQUENCE.


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