Victre Pipeline class.
More...
Victre Pipeline class.
This is all you need!
def Victre.Pipeline.Pipeline.__init__ |
( |
|
self, |
|
|
|
ip, |
|
|
|
seed = None , |
|
|
|
phantom_file = "phantom/pcl_2132574818_crop.raw.gz" , |
|
|
|
spectrum_file = "./Victre/projection/spectrum/W28kVp_Rh50um_Be1mm.spc" , |
|
|
|
lesion_file = None , |
|
|
|
materials = None , |
|
|
|
arguments_mcgpu = dict() , |
|
|
|
arguments_recon = dict() , |
|
|
|
flatfield_file = None |
|
) |
| |
Object constructor for the Victre pipeline class.
- Parameters
-
ip | IP address to run the projection (GPU enabled) |
seed | Random seed used to generate or read the phantom |
phantom_file | Path to file containing the phantom to be loaded |
spectrum_file | Path to file containing the spectrum used to project in MCGPU |
lesion_file | Path to file containing the lesion to be inserted (in HDF5 format) |
materials | Dictionary including the materials to be used during projection |
arguments_mcgpu | Arguments to be overridden for the projection in MCGPU |
arguments_recon | Arguments to be overridden for the reconstruction algorithm |
flatfield_file | Path to the flatfield file for projection |
- Returns
- None
def Victre.Pipeline.Pipeline.add_absent_ROIs |
( |
|
self, |
|
|
|
lesion_type, |
|
|
|
n = 1 , |
|
|
|
locations = None , |
|
|
|
roi_sizes = None |
|
) |
| |
Adds the specified number of absent regions of interest.
- Parameters
-
lesion_type | Constant with the desired lesion type. Check available lesion types and materials in the Constants file. |
n | Number of lesions to be added |
locations | List of coordinates in the voxel/phantom space where the lesions will be inserted. If not specified, random locations will be generated. |
roi_sizes | Size of the region of interest to be calculated to avoid overlapping with other tissues and check out of bounds locations |
- Returns
- None. A location file will be saved inside the
phantom
folder with the corresponding seed. Negative lesion type means absent ROI.
def Victre.Pipeline.Pipeline.generate_spiculated |
( |
|
self, |
|
|
|
seed, |
|
|
|
size |
|
) |
| |
Generates a spiculated mass using the breastMass software.
- Parameters
-
seed | Seed to be used when generating the mass |
size | Size of the mass to be used in the breastMass config file |
- Returns
- None. The result is saved in the
lesions
subfolder
def Victre.Pipeline.Pipeline.get_coordinates_dbt |
( |
|
self, |
|
|
|
vx_location |
|
) |
| |
Method to get the corresponding coordinates in the DBT volume from the voxelized coordinates.
- Parameters
-
vx_location | Coordinates in the voxel/phantom space |
- Returns
- Coordinates in the DBT space
def Victre.Pipeline.Pipeline.get_coordinates_dm |
( |
|
self, |
|
|
|
vx_location |
|
) |
| |
Method to get the corresponding coordinates in the DM volume from the voxelized coordinates.
- Parameters
-
vx_location | Coordinates in the voxel/phantom space |
- Returns
- Coordinates in the DM space
def Victre.Pipeline.Pipeline.get_folder_contents |
( |
|
self, |
|
|
|
folder |
|
) |
| |
Gets a list of files in the given folder.
- Parameters
-
folder | Path to the folder to be processed |
- Returns
- List with files inside the given folder
def Victre.Pipeline.Pipeline.insert_lesions |
( |
|
self, |
|
|
|
lesion_type, |
|
|
|
n = 1 , |
|
|
|
lesion_file = None , |
|
|
|
locations = None , |
|
|
|
roi_sizes = None |
|
) |
| |
Inserts the specified number of lesions in the phantom.
- Parameters
-
lesion_type | Constant with the desired lesion type. Check available lesion types and materials in the Constants file. |
n | Number of lesions to be added |
lesion_file | Path to file including the lesion to be inserted (in HDF5 format). If specified, it will overrite the lesion file specified in the constructor. |
locations | List of coordinates in the voxel/phantom space where the lesions will be inserted. If not specified, random locations will be generated. |
roi_sizes | Size of the region of interest to be calculated to avoid overlapping with other tissues and check out of bounds locations |
- Returns
- None. A location file will be saved inside the
phantom
folder with the corresponding seed. Positive lesion type means absent ROI.
def Victre.Pipeline.Pipeline.project |
( |
|
self | ) |
|
Method that runs MCGPU to project the phantom.
def Victre.Pipeline.Pipeline.reconstruct |
( |
|
self | ) |
|
Method that runs the reconstruction code for the DBT volume.
def Victre.Pipeline.Pipeline.save_DICOM |
( |
|
self | ) |
|
Saves the DBT generated reconstruction (if available) in DICOM format.
def Victre.Pipeline.Pipeline.save_ROIs |
( |
|
self, |
|
|
|
roi_sizes |
|
) |
| |
Saves the generated ROIs (absent and present) in RAW and HDF5 formats.
- Parameters
-
roi_sizes | Size of the ROIs for the defined lesion types |
Victre.Pipeline.Pipeline.arguments_mcgpu |
Victre.Pipeline.Pipeline.arguments_recon |
Victre.Pipeline.Pipeline.flatfield_file |
Victre.Pipeline.Pipeline.ip |
Victre.Pipeline.Pipeline.lesion_file |
Victre.Pipeline.Pipeline.lesion_locations |
Victre.Pipeline.Pipeline.lesions |
Victre.Pipeline.Pipeline.materials |
Victre.Pipeline.Pipeline.recon_size |
Victre.Pipeline.Pipeline.seed |
The documentation for this class was generated from the following file: