Victre 2.0 Pipeline  0.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Public Attributes | List of all members
Victre.Pipeline.Pipeline Class Reference

Victre Pipeline class. More...

Public Member Functions

def __init__
 Object constructor for the Victre pipeline class. More...
 
def project
 Method that runs MCGPU to project the phantom. More...
 
def reconstruct
 Method that runs the reconstruction code for the DBT volume. More...
 
def get_coordinates_dbt
 Method to get the corresponding coordinates in the DBT volume from the voxelized coordinates. More...
 
def get_coordinates_dm
 Method to get the corresponding coordinates in the DM volume from the voxelized coordinates. More...
 
def save_DICOM
 Saves the DBT generated reconstruction (if available) in DICOM format. More...
 
def save_ROIs
 Saves the generated ROIs (absent and present) in RAW and HDF5 formats. More...
 
def get_folder_contents
 Gets a list of files in the given folder. More...
 
def generate_spiculated
 Generates a spiculated mass using the breastMass software. More...
 
def insert_lesions
 Inserts the specified number of lesions in the phantom. More...
 
def add_absent_ROIs
 Adds the specified number of absent regions of interest. More...
 

Public Attributes

 seed
 
 ip
 
 lesion_file
 
 lesions
 
 lesion_locations
 
 arguments_mcgpu
 
 materials
 
 flatfield_file
 
 arguments_recon
 
 recon_size
 

Detailed Description

Victre Pipeline class.

This is all you need!

Constructor & Destructor Documentation

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
ipIP address to run the projection (GPU enabled)
seedRandom seed used to generate or read the phantom
phantom_filePath to file containing the phantom to be loaded
spectrum_filePath to file containing the spectrum used to project in MCGPU
lesion_filePath to file containing the lesion to be inserted (in HDF5 format)
materialsDictionary including the materials to be used during projection
arguments_mcgpuArguments to be overridden for the projection in MCGPU
arguments_reconArguments to be overridden for the reconstruction algorithm
flatfield_filePath to the flatfield file for projection
Returns
None

Member Function Documentation

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_typeConstant with the desired lesion type. Check available lesion types and materials in the Constants file.
nNumber of lesions to be added
locationsList of coordinates in the voxel/phantom space where the lesions will be inserted. If not specified, random locations will be generated.
roi_sizesSize 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
seedSeed to be used when generating the mass
sizeSize 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_locationCoordinates 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_locationCoordinates 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
folderPath 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_typeConstant with the desired lesion type. Check available lesion types and materials in the Constants file.
nNumber of lesions to be added
lesion_filePath to file including the lesion to be inserted (in HDF5 format). If specified, it will overrite the lesion file specified in the constructor.
locationsList of coordinates in the voxel/phantom space where the lesions will be inserted. If not specified, random locations will be generated.
roi_sizesSize 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_sizesSize of the ROIs for the defined lesion types

Member Data Documentation

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: