Extract scatterer from any position corresponding to an ultrasound probe
(Ubuntu)
- libglm-dev
- libdcmtk-dev
- libtbb-dev
(Fedora)
- glm-devel
- dcmtk-devel
- tbb-devel
pip install plotly
pip install pandas
mkdir build
cd build
cmake ..
make
./Scus <Setting File>.json
To generate the scatterers according to the settings file (see next section)
Note that the code may be used as an external library to generate scatterers or real-time ultrasound simulation.
Use the scatterer_visualisation.py
script to visualize scatterers generated using the SPACE
or PROJECTED
modes
Scatterers generated with the RAW
are ready to be used with a standard ultrasound image simulator as in the examples provided
Write the scatterers file name in scus_phantom.m
then use the functions field_init(0)
, mk_pht()
and sim_img()
.
Additionally, python code to run multiple RF line simulation at once is also provided.
Simply use the generateImageFromScats(filename)
function, the simulation parameters are adjustable in the .m file
Json file
{
"Grid" : {
see GRID
},
"Acquisition Zone" : {
see ACQUISITION
},
"OutFile" : {
"Mode": "SPACE"/"PROJECTED"/"RAW", //SPACE/PROJECTED: For visualisation. RAW: To be used in simulations
"Name": ... //name of the outfile
}
}
Grid
"Dimension":{ //in mm
"x":number, //multiples of CellDim
"y":number,
"z":number
},
"UseRot":true/false, //random rotation of the cells
"CellDim":number, //mm
"SamplesPerCell":number,
"Sampler":"dart"/"regular"/"uniform"/"cascaded",
"FixedSeed":number, //-1 for time based random
"WeightingObject":{
see WEIGTHINGOBJECT
}
Acquition Zone
"Dimension":{ //mm
"Width":number,
"Height":number,
"Depth":number
},
"Position":{ //mm
"x":number,
"y":number,
"z":number
},
"Rotation":{
"Angle":number //degree
"Axis":{ //axis of the rotation, will be normalized
"x":number,
"y":number,
"z":number
}
Weighting Object
"Type":"Dicom"/"Plane"/"Sphere"/"Cube",
Dicom (Opening medical data in slices form)
"Files":[
pathtodicom1,
pathtodicom2,
...
pathtodicomN
]
Plane (Medium seperated in two by a plane)
"Height":number //mm
Sphere
"Position":{ //mm
"x":number,
"y":number,
"z":number
},
"Radius":number //mm
Cube
"Position":{ //mm
"x":number,
"y":number,
"z":number
},
"Side":number //mm