API Reference¶
This section provides a detailed API reference for the core modules in the VITools library.
Phantom Module¶
Defines the Phantom class and related utility functions.
This module provides the core components for representing and manipulating phantoms in virtual imaging trials. It includes the Phantom class, which encapsulates the phantom’s image data and metadata, and helper functions for resizing and converting DICOM images to voxelized phantoms compatible with the XCIST simulation framework.
- class VITools.phantom.Phantom(img: ndarray, spacings: tuple = (1, 1, 1), patient_name: str = 'default', patientid: int = 0, age: float = 0)¶
Bases:
objectA base class for representing a medical phantom.
This class encapsulates a 2D or 3D image array, its voxel spacings, and patient-related metadata.
- dz¶
Voxel spacing in the z-direction (mm).
- Type:
float
- dx¶
Voxel spacing in the x-direction (mm).
- Type:
float
- dy¶
Voxel spacing in the y-direction (mm).
- Type:
float
- nz¶
Number of voxels in the z-direction.
- Type:
int
- nx¶
Number of voxels in the x-direction.
- Type:
int
- ny¶
Number of voxels in the y-direction.
- Type:
int
- patient_name¶
Patient identifier for DICOM headers.
- Type:
str
- patientid¶
Patient ID for DICOM headers.
- Type:
int
- age¶
Patient age in years for DICOM headers.
- Type:
float
- get_CT_number_phantom() ndarray¶
Returns the phantom’s CT number array.
- resize(shape: tuple, **kwargs) None¶
Resizes the phantom and adjusts voxel spacings.
This method resizes the internal phantom array to the given shape and recalculates the voxel spacings to maintain the phantom’s physical size.
- Parameters:
shape (tuple) – The new target shape for the phantom array (nz, nx, ny).
**kwargs – Additional keyword arguments passed to the resize function, which in turn passes them to monai.transforms.Resize.
- property shape: tuple¶
Returns the shape of the phantom array in (nz, nx, ny) order.
- property size: ndarray¶
Returns the physical size of the phantom (mm) as a tuple (z, x, y).
- property spacings: tuple¶
Returns the voxel spacings (z, x, y) in mm.
- VITools.phantom.resize(phantom: ndarray, shape: tuple | int, **kwargs) ndarray¶
Resizes a phantom to a new shape while maintaining aspect ratio.
This function uses scipy.ndimage.zoom to resize a 2D or 3D phantom array. This implements the equivalent of MONAI’s size_mode=’longest’ which scales the longest dimension to match the corresponding dimension in shape, and scales other dimensions proportionally.
mode = ‘nearest’ is useful for downsizing without interpolation errors (mapped to scipy order=0).
- Parameters:
phantom (np.ndarray) – The phantom image array to resize.
shape (tuple | int) – The target shape for the phantom. If a tuple, max(shape) is used as the target size for the longest dimension.
**kwargs – Additional keyword arguments. Supported: - mode: ‘nearest’ (use order=0), otherwise defaults to order=1 (linear). - order: directly passed to scipy.ndimage.zoom.
- Returns:
The resized phantom array.
- Return type:
np.ndarray
- VITools.phantom.voxelize_ground_truth(dicom_path: str | Path, phantom_path: str | Path, material_threshold_dict: dict | None = None)¶
Converts a ground truth DICOM series into a voxelized phantom for XCIST.
This function takes a series of DICOM images and segments them into different materials based on Hounsfield Unit (HU) thresholds. The resulting voxelized phantom can be used in XCIST simulations.
- Parameters:
dicom_path (str | Path) – Path to the directory containing the DICOM series. These are typically the output of convert_to_dicom.
phantom_path (str | Path) – Path to the directory where the output phantom files will be written.
material_threshold_dict (dict | None, optional) – A dictionary mapping material names (e.g., ‘ncat_adipose’) to their lower HU threshold values. If None, a default dictionary for brain tissue is used. For examples, see: https://github.com/xcist/phantoms-voxelized/tree/main/DICOM_to_voxelized
Scanner Module¶
Simulates CT image acquisition using the GECATSim library.
This module provides the Scanner class, a high-level interface for configuring and running virtual CT scans using GECATSim. It handles the entire pipeline, from phantom preparation and voxelization to running the simulation, reconstructing the image, and saving the output in DICOM format.
Key functionalities include: - Reading and writing DICOM files. - Converting NumPy arrays to DICOM series. - Voxelizing phantoms for simulation based on material thresholds. - Initializing and configuring a virtual CT scanner (gecatsim.CatSim). - Running simulated scans in both axial and helical modes. - Reconstructing CT images from raw projection data. - Generating scout views for scan planning.
- class VITools.scanner.Scanner(phantom: Phantom, scanner_model: str = 'Scanner_Default', studyname: str = 'default_study', studyid: int = 0, seriesname: str = 'default_series', seriesid: int = 0, framework: str = 'CATSIM', output_dir: str | Path | None = None, materials: dict | None = None)¶
Bases:
objectManages CT simulation, from setup to reconstruction and DICOM output.
This class acts as a high-level wrapper around the GECATSim library, simplifying the process of running virtual imaging trials. It takes a Phantom object and handles the GECATSim configuration, scan execution, image reconstruction, and final output.
- scanner_model¶
Name of the GECATSim scanner configuration.
- Type:
str
- output_dir¶
Root directory for all simulation outputs.
- Type:
Path
- xcist¶
The underlying GECATSim simulation object.
- Type:
xc.CatSim
- recon¶
Stores the reconstructed image volume.
- Type:
np.ndarray | None
- projections¶
Stores the raw projection data.
- Type:
np.ndarray | None
- start_positions¶
Calculated Z-axis start positions for a series of axial scans.
- Type:
np.ndarray
- total_scan_length¶
Total length of the phantom along the Z-axis.
- Type:
float
- pitch¶
The pitch value for helical scans (0 for axial).
- Type:
float
- kVp¶
The kVp value used for the most recent scan.
- Type:
float
- tempdir¶
Manages a temporary directory for outputs if output_dir is not specified.
- Type:
TemporaryDirectory | None
- axial_recon() ndarray¶
Performs reconstruction for an axial scan.
- Returns:
The reconstructed 3D image volume.
- Return type:
np.ndarray
- axial_scan(startZ: float, endZ: float) list[str]¶
Runs an axial scan acquisition.
The scanner performs a series of acquisitions at discrete table positions to cover the specified Z-range.
- Parameters:
startZ (float) – The starting Z-position (mm) of the scan.
endZ (float) – The ending Z-position (mm) of the scan.
- Returns:
A list of paths to the generated projection files.
- Return type:
list[str]
- calculate_start_positions(startZ: float | None = None, endZ: float | None = None) ndarray¶
Determines Z-axis start positions for a series of axial scans.
This calculates the table positions needed to cover a specified range of the phantom, bounded by the phantom’s total Z-length.
- Parameters:
startZ (float | None, optional) – Desired starting Z position (mm) relative to phantom center (0). Defaults to the phantom’s negative z-extent.
endZ (float | None, optional) – Desired ending Z position (mm). Defaults to the phantom’s positive z-extent.
- Returns:
- An array of Z positions (mm) where each axial scan
should start.
- Return type:
np.ndarray
- helical_recon() ndarray¶
Performs reconstruction for a helical scan.
- Returns:
The reconstructed 3D image volume.
- Return type:
np.ndarray
- Raises:
ValueError – If called for a scan with pitch=0.
- helical_scan(startZ: float, endZ: float, pitch: float) list[str]¶
Runs a helical scan acquisition.
The scanner table moves continuously while the gantry rotates to acquire data over the specified Z-range.
- Parameters:
startZ (float) – The starting Z-position (mm) of the scan.
endZ (float) – The ending Z-position (mm) of the scan.
pitch (float) – The pitch value for the helical scan.
- Returns:
A list containing the path to the projection file.
- Return type:
list[str]
- kernels = ['standard', 'soft', 'bone', 'R-L', 'S-L']¶
- load_scanner_config(filename: str | Path = 'Scanner_Default')¶
Loads a specific scanner hardware configuration into GECATSim.
- Parameters:
filename (str | Path) – The name of a scanner config directory in defaults (e.g., ‘GE_Lightspeed16’) or a direct path to one.
- Returns:
The Scanner instance for method chaining.
- Return type:
- Raises:
FileNotFoundError – If the specified config is not found.
- property nominal_aperature: float¶
Calculates the nominal collimated beam width (aperture) at isocenter.
This is derived from the detector row size, detector row count, and the system magnification (SDD/SID).
- Returns:
The nominal aperture in mm.
- Return type:
float
- recommend_scan_range(threshold: float = -950) tuple[int, int]¶
Recommends a scan range based on a scout view attenuation profile.
It analyzes the mean attenuation along the phantom’s Z-axis to find the extent of material above a given HU threshold, suggesting a tighter scan range.
- Parameters:
threshold (float, optional) – The HU threshold to distinguish material from air. Defaults to -950.
- Returns:
Recommended (startZ, endZ) in mm, as integers.
- Return type:
tuple[int, int]
- run_recon(fov: float | None = None, slice_thickness: float | None = None, slice_increment: float | None = None, mu_water: float | None = None, kernel: str = 'standard')¶
Performs image reconstruction and stores it in self.recon.
- Parameters:
fov (float | None, optional) – Field of View (mm) for reconstruction. Defaults to None, using the config default.
slice_thickness (float | None, optional) – Nominal width (mm) of the reconstructed slice along the z-axis. Defaults to slice_increment.
slice_increment (float | None, optional) – Distance (mm) between consecutive reconstructed slices. Defaults to slice_thickness.
mu_water (float | None, optional) – The linear attenuation coefficient (mu) of water for HU scaling. If None, it’s calculated based on the monochromatic energy. Defaults to None.
kernel (str, optional) – Reconstruction kernel. Options include: ‘standard’, ‘soft’, ‘bone’, ‘R-L’ (Ram-Lak), ‘S-L’ (Shepp-Logan). Defaults to ‘standard’.
- Returns:
The Scanner instance for method chaining.
- Return type:
- Raises:
ValueError – If an unsupported kernel is specified.
- run_scan(mA: float = 200, kVp: int = 120, startZ: float | None = None, endZ: float | None = None, views: int | None = None, pitch: float = 0, bhc: bool | str = True)¶
Runs the CT simulation with the specified parameters.
- Parameters:
mA (float, optional) – X-ray source milliamps. Higher mA reduces noise. Defaults to 200.
kVp (int, optional) – X-ray source potential. Affects beam energy and contrast. Must be one of [70, 80, …, 140]. Defaults to 120.
startZ (float | None, optional) – Starting table position (mm) for the scan. Defaults to the first calculated position.
endZ (float | None, optional) – Ending table position (mm) for the scan. Defaults to the last calculated position.
views (int | None, optional) – Number of views per rotation. Reducing can speed up tests but may cause aliasing. Defaults to None, using the protocol’s default.
pitch (float, optional) – The ratio of table travel per rotation to beam width. A pitch of 0 indicates an axial scan. A pitch > 0 indicates a helical scan. Defaults to 0.
bhc (bool | str, optional) – Beam hardening correction. - True: Applies a polynomial correction. - False: Disables BHC. - ‘default’: Uses XCIST’s default BHC (can cause capping). Defaults to True.
- Returns:
The Scanner instance for method chaining.
- Return type:
- Raises:
ValueError – If an unsupported kVp or pitch is selected.
- scout_view(startZ: float | None = None, endZ: float | None = None, pitch: float = 0.0)¶
Displays a simulated scout radiograph of the phantom.
This shows a projection image (summed along one axis) overlaid with indicators for the current scan range and other scan parameters.
- Parameters:
startZ (float | None, optional) – Starting Z position for the scan range overlay. Defaults to the calculated start.
endZ (float | None, optional) – Ending Z position for the scan range overlay. Defaults to the calculated end.
pitch (float, optional) – Pitch value to display table speed for helical scan planning. Defaults to 0.0 (axial).
- write_to_dicom(fname: str | Path, groundtruth: bool = False) list[Path]¶
Writes the reconstructed or ground truth CT data to a DICOM series.
- Parameters:
fname (str | Path) – The base filename for the DICOM series. Slices will be numbered (e.g., base_000.dcm, base_001.dcm).
groundtruth (bool, optional) – If True, saves the ground truth phantom image instead of the reconstructed image. Defaults to False.
- Returns:
A list of paths to the written DICOM files.
- Return type:
list[Path]
Adapted from: https://github.com/DIDSR/pediatricIQphantoms/blob/main/src/pediatricIQphantoms/make_phantoms.py#L144
- VITools.scanner.convert_to_dicom(img_slice: ndarray, phantom_path: str | Path, spacings: tuple[float, float, float])¶
Converts a 2D NumPy array (image slice) into a DICOM file.
A template DICOM file (“CT_small.dcm”) is used and modified with the provided image data and metadata.
- Parameters:
img_slice (np.ndarray) – The input 2D NumPy array representing the image slice. Values are typically expected to be in HU.
phantom_path (str | Path) – The filename or path where the DICOM file will be saved.
spacings (tuple[float, float, float]) – A tuple containing voxel spacings in mm, ordered as (slice_thickness, pixel_spacing_rows, pixel_spacing_cols). Corresponds to (z, y, x).
- VITools.scanner.get_projection_data(ct: CatSim) ndarray¶
Reads raw projection data from the GECATSim simulation results.
- Parameters:
ct (xc.CatSim) – The GECATSim simulation object after a scan has been run. It is expected that ct.resultsName is set and the corresponding ‘.prep’ file exists.
- Returns:
- A NumPy array containing the projection data, typically
with shape (viewCount, detectorRowCount, detectorColCount).
- Return type:
np.ndarray
- Raises:
FileNotFoundError – If the projection data file does not exist.
- VITools.scanner.get_reconstructed_data(ct: CatSim) ndarray¶
Reads reconstructed image data from the GECATSim simulation results.
- Parameters:
ct (xc.CatSim) – The GECATSim simulation object after reconstruction. It’s expected that ct.resultsName and reconstruction parameters (imageSize, sliceCount) are set, and the corresponding ‘.raw’ reconstruction file exists.
- Returns:
- A NumPy array containing the reconstructed image volume,
typically with shape (sliceCount, imageSize, imageSize).
- Return type:
np.ndarray
- Raises:
FileNotFoundError – If the reconstructed data file does not exist.
- VITools.scanner.initialize_xcist(ground_truth_image: ndarray, spacings: tuple[float, float, float] = (1.0, 1.0, 1.0), scanner_model: str = 'Scanner_Default', output_dir: str | Path = 'default_xcist_output', phantom_id: str = 'default_phantom', materials: dict | None = None) CatSim¶
Initializes a GECATSim (xc.CatSim) object for CT simulation.
This function performs the initial setup for a simulation, including: 1. Loading default configuration files. 2. Setting up output directories. 3. Converting the input ground_truth_image (in HU) into a series of
DICOM slices.
Voxelizing the DICOM series into a material-segmented phantom that GECATSim can use, based on the provided material thresholds.
- Parameters:
ground_truth_image (np.ndarray) – A 3D NumPy array representing the phantom in HU. Expected dimensions are (slices, rows, cols).
spacings (tuple[float, float, float], optional) – Voxel spacings in mm (z, y, x). Defaults to (1.0, 1.0, 1.0).
scanner_model (str, optional) – Name of the scanner configuration to load from the ‘defaults’ directory. Defaults to ‘Scanner_Default’.
output_dir (str | Path, optional) – Base directory for simulation outputs. Defaults to ‘default_xcist_output’.
phantom_id (str, optional) – Identifier for this phantom instance, used in filenames. Defaults to ‘default_phantom’.
materials (dict | None, optional) – A dictionary mapping material names to their HU threshold values for segmentation. If None, default brain tissue thresholds are used by voxelize_ground_truth.
- Returns:
The initialized GECATSim simulation object.
- Return type:
xc.CatSim
- VITools.scanner.load_vol(file_list: list[str | Path]) ndarray¶
Loads a list of DICOM files into a 3D NumPy array (volume).
- Parameters:
file_list (list[str | Path]) – A list of paths to the DICOM files that make up the volume.
- Returns:
A 3D NumPy array representing the stacked volume.
- Return type:
np.ndarray
- VITools.scanner.read_dicom(dcm_fname: str | Path) ndarray¶
Reads a DICOM file and returns the pixel array in Hounsfield Units (HU).
- Parameters:
dcm_fname (str | Path) – The path to the DICOM file.
- Returns:
- A NumPy array containing the pixel data, adjusted by the
RescaleIntercept to be in HU.
- Return type:
np.ndarray
Study Module¶
Manages and executes virtual imaging studies.
This module provides the Study class, which is the primary tool for setting up, managing, and running a series of virtual imaging trials. It supports loading study parameters from CSV files, generating diverse scan protocols from statistical distributions, and executing these simulations either serially or in parallel on a high-performance computing cluster.
The module also includes a plugin system for discovering available phantom types and a command-line interface for running studies.
- class VITools.study.Study(input_csv: DataFrame | str | Path | None = None)¶
Bases:
objectManages and executes a series of imaging simulations.
This class handles the definition of study parameters from CSV files or DataFrames, generates scan parameters from distributions, and runs the simulations serially or in parallel. It also tracks and retrieves simulation results.
- metadata¶
A DataFrame holding the parameters for each scan in the study.
- Type:
pd.DataFrame
- append(phantom: str | DataFrame, output_directory: str | Path = 'results', scanner_model: str = 'Scanner_Default', kVp: int = 120, mA: int = 200, pitch: float = 0, views: int = 1000, fov: float = 250, scan_coverage: tuple[float, float] | str = 'dynamic', recon_kernel: str = 'standard', slice_thickness: int | None = 1, slice_increment: int | None = None, seed: int | None = None, remove_raw: bool = True, **kwargs) Study¶
Appends one or more scans to the study’s metadata.
If phantom is a DataFrame, it’s concatenated to the existing metadata. Otherwise, a new scan configuration is created from the provided parameters and added.
- Parameters:
phantom (str | pd.DataFrame) – Phantom name or a DataFrame of scans.
output_directory (str | Path, optional) – Base output directory. Defaults to ‘results’.
scanner_model (str, optional) – Scanner model name. Defaults to ‘Scanner_Default’.
kVp (int, optional) – Kilovolt peak. Defaults to 120.
mA (int, optional) – Milliampere value. Defaults to 200.
pitch (float, optional) – Pitch value. Defaults to 0.
views (int, optional) – Number of views. Defaults to 1000.
fov (float, optional) – Field of View (mm). Defaults to 250.
scan_coverage (tuple[float, float] | str, optional) – Scan range (start_z, end_z) or ‘dynamic’. Defaults to ‘dynamic’.
recon_kernel (str, optional) – Recon kernel. Defaults to ‘standard’.
slice_thickness (int | None, optional) – Slice thickness (mm). Defaults to 1.
slice_increment (int | None, optional) – Slice increment (mm). Defaults to slice_thickness.
seed (int | None, optional) – Random seed. Defaults to None.
remove_raw (bool, optional) – Remove raw data post-recon. Defaults to True.
- Returns:
The Study instance for method chaining.
- Return type:
- Raises:
KeyError – If the phantom name is not an available type.
- clear_previous_results()¶
Removes output directories associated with each scan in the study.
This iterates through the ‘output_directory’ column in the metadata and deletes each directory if it exists, effectively cleaning up before re-running a study.
- static generate_from_distributions(phantoms: list[str], study_count: int = 1, output_directory: str | Path = 'results', views: list[int] = [1000], scan_coverage: str | list | tuple = 'dynamic', scanner_model: list[str] = ['Scanner_Default'], kVp: list[int] = [120], mA: list[int] = [300], pitch: list[float] = [0], recon_kernel: list[str] = ['soft'], slice_thickness: list[int] = [1], slice_increment: list[int] = [1], fov: list[float] = [250], remove_raw: bool = True, seed: int | None = None) DataFrame¶
Generates study metadata by sampling parameters from distributions.
For each of study_count cases, parameters like phantom type, scanner, kVp, and mA are chosen randomly from the provided lists, allowing for the creation of diverse datasets.
- Parameters:
phantoms (list[str]) – List of phantom names to choose from.
study_count (int, optional) – Number of scan configurations to generate. Defaults to 1.
output_directory (str | Path, optional) – Base directory for output. Defaults to ‘results’.
views (list[int], optional) – List of view counts per rotation. Defaults to [1000].
scan_coverage (str | list | tuple, optional) – Scan coverage. Can be ‘dynamic’, or a list/tuple of [start_z, end_z]. Defaults to ‘dynamic’.
scanner_model (list[str], optional) – List of scanner model names. Defaults to [‘Scanner_Default’].
kVp (list[int], optional) – List of kVp values. Defaults to [120].
mA (list[int], optional) – List of mA values. Defaults to [300].
pitch (list[float], optional) – List of pitch values. Defaults to [0].
recon_kernel (list[str], optional) – List of recon kernel names. Defaults to [‘soft’].
slice_thickness (list[int], optional) – List of slice thicknesses (mm). Defaults to [1].
slice_increment (list[int], optional) – List of slice increments (mm). Defaults to [1].
fov (list[float], optional) – List of Field of View values (mm). Defaults to [250].
remove_raw (bool, optional) – Whether to remove raw projection data after reconstruction. Defaults to True.
seed (int | None, optional) – Seed for the random number generator. If None, a random seed is used. Defaults to None.
- Returns:
A DataFrame containing the generated study parameters.
- Return type:
pd.DataFrame
- Raises:
ValueError – If seed is invalid.
- get_images(patientid: int = 0) ndarray¶
Loads the reconstructed image volume for a specific case.
- Parameters:
patientid (int, optional) – The index of the case to load. Defaults to 0.
- Returns:
A 3D NumPy array containing the image volume.
- Return type:
np.ndarray
- get_scans_completed() DataFrame¶
Collects and returns metadata from all completed scans in the study.
It searches for ‘metadata_*.csv’ files within the output directories and concatenates them into a single DataFrame.
- Returns:
- A DataFrame with results from all completed scans.
Returns an empty DataFrame if no results are found.
- Return type:
pd.DataFrame
- load_phantom(patientid: int = 0) Phantom¶
Loads and initializes the phantom for a specific case.
- Parameters:
patientid (int, optional) – The index of the scan configuration in the metadata. Defaults to 0.
- Returns:
An initialized instance of the specified phantom class.
- Return type:
- load_study(input_csv: str | Path | DataFrame)¶
Loads study metadata from a CSV file or a pandas DataFrame.
- Parameters:
input_csv (str | Path | pd.DataFrame) – The path to a CSV file or a pandas DataFrame containing the study parameters. The loaded data replaces any existing metadata.
- property results: DataFrame¶
A property to access the aggregated results of all completed scans.
- run_all(parallel: bool = True, overwrite: bool = False, chunk_size: int | None = None) Study¶
Runs all scans defined in the study.
Clears previous results if overwrite is True. It attempts to run scans in parallel using a batch system (e.g., SGE/qsub) if available and parallel is True, otherwise runs them serially.
- Parameters:
parallel (bool, optional) – If True, attempts to run scans in parallel. Defaults to True.
overwrite (bool, optional) – If True, deletes previous results before running. If False, resumes from unfinished scans. Defaults to False.
chunk_size (int | None, optional) – If set and running in parallel, splits the study into chunks of this size and runs them sequentially. Defaults to None.
- Returns:
The Study instance, after all scans have been processed.
- Return type:
- run_study(patientid: int = 0) DataFrame¶
Runs a single simulation for a specific case ID.
This method orchestrates the full pipeline for one scan: 1. Initializes the phantom. 2. Sets up the scanner. 3. Determines the scan range. 4. Runs the scan and reconstruction. 5. Writes the output to DICOM files. 6. Returns a DataFrame with metadata about the generated images.
- Parameters:
patientid (int, optional) – The index of the scan configuration in self.metadata to run. Defaults to 0.
- Returns:
- A DataFrame containing metadata for the generated
DICOM files, including file paths.
- Return type:
pd.DataFrame
- VITools.study.clean_study(study_root: str)¶
removes intermediate files from incomplete scans
- Parameters:
study_root (str) – root folder containing study, must contain *_study_plan.csv file
- VITools.study.get_available_phantoms() dict[str, type[Phantom]]¶
Discovers and returns available phantom classes via a plugin system.
This function uses the pluggy framework to find and load all installed plugins that have registered phantom types through the register_phantom_types hook specification.
- Returns:
- A dictionary mapping the unique string name of
each discovered phantom to its corresponding class type.
- Return type:
dict[str, type[Phantom]]
- VITools.study.scan_logs_for_errors(directory_path, verbose=True)¶
Scans a directory for log files (e.g., task_0.log to task_4999.log), prints which log files have a raised error, and copies the error message raised in that log file.
- Parameters:
directory_path (str) – The path to the directory containing the log files.
- VITools.study.vit_clean_cli(arg_list: list[str] | None = None)¶
Command-line interface for cleaning VITools simulations.
- Parameters:
arg_list (list[str] | None, optional) – A list of command-line arguments. If None, sys.argv[1:] is used. Defaults to None.
- VITools.study.vit_cli(arg_list: list[str] | None = None)¶
Command-line interface for Virtual Imaging Tools simulations.
Parses arguments to specify an input CSV for study parameters and an option to run in parallel. It initializes a Study and calls run_all.
- Parameters:
arg_list (list[str] | None, optional) – A list of command-line arguments. If None, sys.argv[1:] is used. Defaults to None.