scanometrics.GUI.ReportGenerator package

Submodules

scanometrics.GUI.ReportGenerator.ReportGenerator module

class scanometrics.GUI.ReportGenerator.ReportGenerator.ReportGenerator(filename, sub_name, sub_ses, acq, folder_path)

Bases: object

A class to generate a PDF report for ScanOMetrics.

Attributes:

filename (str): The name of the PDF file to be generated. sub_name (str): The subject name. sub_ses (str): The session number. acq (str): The acquisition label. folder_path (str): The directory to save the report. plots (list): A list to store plot data. metrics (dict): A dictionary to store metrics data. story (list): A list to hold the flowable elements for the PDF. styles (StyleSheet1): The default stylesheet for the PDF.

add_brain_snapshot(brain_screenshot)
add_default_metrics(metrics)

Add the default metrics to the report.

Args:

metrics (list): List of default metrics to be added.

add_line()

Add a horizontal line to the report for visual separation.

add_plot(plot_data)

Add a plot to the report.

Args:

plot_data (dict): Dictionary containing the plot image and caption.

create_pdf_report()

Create a PDF report with the added plots and metrics.

get_documents_path()

Get the path to the user-specified directory and create necessary directories.

Returns:

Path: The full path to the PDF file to be generated.