Skip to content

Swap out default Report Generator to xASL_qc_GenerateReport #1476

@maartenhammer

Description

@maartenhammer

Description

#1225 implemented a new PDFGenerator, #1552 updated the PDF generator to the recent multi-session x.Output format.

Tasks

  • adapting configuration to existing PDF (was already done by Maarten in the config generator
  • Change xASL_qc_GenerateReport to run module-wise
  • Change xASL_qc_GenerateReport to run session-wise
  • Use this new report generator in xASL_module_Structural & xASL_module_ASL
  • Move xASL_qc_CreatePDF.m to the legacy ExploreASL folder in CustomScripts repository
  • qc_glossary.tsv: improve aliases, including units behind the key-name instead of behind the values, where the ranges should be (seems a more economical use of the page space)
  • xASL_qc_GeneratePDFConfig: sort key-names
  • Do not store the PDF config file, we recreate this per module, per subject. We temporarily store this in the subject-folder
  • xASL_qc_ParsePdfConfig: Instead of the footer "created by ExploreASL", which is clear from the ExploreASL logo, I added date and time
  • xASL_qc_ParsePdfConfig: cosmetic revamp: added subfunction lists and explanations, removed subfunctions that fit within another subfunction because they were very short, moved settings subfunctions to text and image subfunctions, and text subfunctions to image subfunctions, if they were used there only

miscellaneous **

  • xASL_adm_GzipAllFiles: add feedback to unix zipping. With unix zipping, there was no feedback to the user that it takes quite long, and there was no progress shown on the files that were zipped. This is fixed now. Very small change that doesn't need a separate issue imho.

Add reference ranges (old #1440 now integrated here)

  • xASL_qc_CreateQCreference: created new reference range values from EPAD, created a new WIP function for this that crawls reference values from a dataset (EPAD VUmc site in this case, which is Philips 2D EPI with Bsup and a long PLD), and stores them in separate .mat files with similar structure as x.mat, so it can be matched in qc_glossary.tsv key-by-key and added as ranges
  • xASL_qcGeneratePdfConfig: some bugfixes for module parsing
  • xASL_qcGeneratePdfConfig: manually fixed PDF text & image positions for better layout & having the text nicely spread out
  • xASL_qcGeneratePdfConfig: print subject in the title
  • xASL_qc_ParsePdfConfig: don't print subject as QC key-value
  • xASL_qc_ParsePdfConfig: fix positions of logo & date/time
  • xASL_qc_ParsePdfConfig: -fillpage gives a better layout than -bestfit
  • xASL_qc_ParsePdfConfig_sub_Generate_QC_String: full revamp

Add QC images to fieldName where fieldName is fileName of the printed NIfTI, to allow printing a figure legend

  • x.Output_im.(module).(session).[image matrix] -> x.Output_im.(module).(session).(imageName).[image matrix]
  • qc_glossary: Cleanup
  • xASL_wrp_VisualQC_Structural: store QC image filenames
  • xASL_wrp_VisualQC_ASL: store QC image filenames & fix TrackProgress
  • xASL_wrp_VisualQC_ASL: fix TrackProgress
  • xASL_vis_AddIM2QC: add QC image filenames as a separate field containing the image cell
  • xASL_qc_CollectParameters: store software versions also for sessions
  • xASL_qc_CollectParameters: rename ScanType->Module
  • xASL_qc_ParsePdfConfig: abbreviate Git commit to 7 length-format in PDF
  • xASL_qc_ParsePdfConfig: use QC image filename field
  • xASL_qc_ParsePdfConfig: add caption (header) below QC images

Manual for ourselves:

  1. inside modules, output is printed to x.Output & x.Output_im
  2. xASL_qc_GenerateReport -> xASL_qc_LoadPdfConfig (move as subfunction to former)
    configReportPDF.json is created by user (or automatically in the case of ExploreASL)
    containing all pages/canvases/images/text etc to be printed to the PDF
  3. xASL_qc_ParsePdfConfig then goes over the config, and creates the PDF based on the content
    of this config, using the content of x.Output & x.Output_im (in the case of ExploreASL)
    using the nomenclature, units, and ranges stored in QC_glossary.tsv
  4. QC_glossary.tsv ranges are created from EPAD using xASL_qc_CreateQCreference

ToDo

  • HJ: Compute ranges with NOVICE & Sleep as well, is more robust than only with EPAD
  • @jan-petr Create list of meaning of parameters (already in the documentation online?)

PM

  • Add CBF ranges for MindBoggle atlas ROIs (if mediri will still implement this?)
  • Add sagittal QC images
  • PM: Merge xASL_adm_formatWithRoundedMagnitude with xASL_num2str
  • PM: Figure alignment is slightly off -> perhaps Jan can fix this? may have to do with the PDF resampling?

How to test

  • Continuously tested by Henk with /External/TestDataSet
  • PDF output checked by Henk with TestDataSets
  • Are parameters missing?
  • PM: which parameters shall we not print? Should we separate into QC & output measurements?
  • PM: Should we recalculate the ranges with new releases, if quantification changes significantly? (perhaps not really)
  • JAN: Run UnitTests
  • JAN: Run 10 TestDataSets

Release notes

Implementation of a new optimized PDF generator

Metadata

Metadata

Assignees

Labels

featureNew feature, enhancement or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions