Releases: markmikkelsen/Gannet
Releases · markmikkelsen/Gannet
3.5.1
3.5.0
New features
- Gannet is now compatible with BIDS
bids-matlab, a MATLAB toolkit for interfacing with BIDS datasets, is embedded in Gannet, and users can now input BIDS datasets directly intoGannetLoad.m(see documentation for usage instructions)
- Added image QA metrics based on MRIQC
GannetSegment.mnow calculates and saves the following QA metrics for each anatomical image:- Signal-to-noise ratio (SNR) of GM, WM, CSF, and the whole brain (two variants: one using the median absolute deviation of the air background based on Dietrich et al. (2007), and one using the standard deviation of the noise within the tissue class)
- Contrast-to-noise ratio (CNR) between GM and WM
- Coefficient of variation (CV) of GM and WM
- Coefficient of joint variation (CJV) between GM and WM
- Entropy-focus criterion (EFC)
- Foreground-background energy ratio (FBER)
- WM to maximum intensity ratio (WM2MAX): the median intensity within WM over the 95% percentile of the full intensity distribution, that captures the existence of long tails due to hyper-intensity of the carotid vessels and fat
- These metrics are saved in
MRS_struct.out.QA
- Added GitHub Actions for continuous integration with
bids-matlab,dicm2nii, andexport_figto ensure compatibility with the latest versions of these dependencies - Added
dependabot.ymlto automatically check for updates to GitHub Actions - Water-unfiltered (but aligned) spectra are now saved in
MRS_struct - All version strings (e.g.,
MRS_struct.version.*) are now stored underMRS_struct.info.version.*, and datetime stamps for processing steps are added asMRS_struct.info.datetime.*
Major changes
- When calculating GM, WM, and CSF fractions in
GannetSegment.m, the probabilistic tissue maps are now thresholded at 0.9 before calculating the fractions. This should improve the accuracy of tissue fraction estimates
Minor changes
- Modified
SiemensTWIXRead.mto use iceParam forpointsBeforeEchoin MEGA-sLASER, aligning with MEGA-PRESS handling for consistency - Changed the naming convention for water residual fit results from
ResidWatertoresid_waterinGannetFit.mfor consistency - Improved input argument validation and error messages, including checks for cell array inputs and file existence, with clearer error output for missing files
- Updated
export_figto v3.52 - Updated
dicm2niito v2025.08.21 - MANY COSMETIC CHANGES to improve code readability and maintainability
Full changelog: v3.4.0...v3.5.0
3.4.0
New features
- Added support for fitting the 2.34 ppm Glu peak in the SUM spectrum
- Added
DeIdentifyDisclaimer.m, which prints a disclaimer that the developers provide no guarantee that the de-identification functions will remove all human participants' identifying information in the data header of files - The RF coil combination used is now stored in
MRS_struct.p.RFCoilCombination(note: this only applies to raw data files that are not coil-combined during export from the scanner) - Data load time (
MRS_struct.loadtime) is now stored whenGannetLoad.mis run - Re-added the option to choose the editing pulse order in
GannetPreInitialise.m:MRS_struct.p.ON_OFF_order - MRS voxel masks can now be normalized to MNI152 space; a flag in
GannetPreInitiliase.mhas been added to do so (note that this is only performed if GannetSegment has been run as the forward deformation map needed for MNI normalization is created during SPM12's segmentation routine) - Added
VoxelMaskOverlap.m, a function that will create a voxel mask that indicates the degree of overlap of all datasets run in a batch - Added
ThreeLorentzModel.m - Added
VoigtModel.m
Minor changes
- An "intro" message is printed whenever
GannetLoad.mis run: the version number and a link to the software documentation website is displayed - Co-registration figure outputs now show the anatomical directions of the displayed MR image (i.e., anterior/posterior [A/P], left/right [L/R], and superior/inferior [S/I])
- Replaced file separators with
filesepso that they are specific to users' operating system voxoffis now parsed inGERead.minstead of inGannetMask_GE.mandGannetMask_GE_nii.m- Minor changes to rounding in
ExportToCSV.m - Renamed
FitPeaksByFrames2.mtoFitPeaksByFrames.m - Updated
export_figto v3.48 - Updated
dicm2niito v2024.08.21 - MANY COSMETIC CHANGES AND CLEANUP OF OLD UNUSED CODE
Bug fixes
- Updated
AlignSubSpectra.mto include Lac and GSH editing - Updated
AlignUsingPeak.mto fit the indexing approach of Gannet 3 - Fixed issue with Siemens .RDA files in
CoRegStandAlone.m - Added
MRS_struct.p.seqorigtoCoRegStandAlone.m - Minor fix in
GannetMask_NIfTI.mfor how voxel offset is parsed from the NIfTI file - Fixed an issue with
GannetFit.mwhen users choose to fit a specific metabolite - Corrected a bug in
PaperPlot.mfor plotting model fits for GABA+Glx - Fixed an issue in
AlignUsingPeak.mwhen running more than one file in a batch
3.3.2
Major changes
- Rewrote
SiemensRead.mto reduce code length
Minor changes
- Updated
DICOMRead.m, including to support Siemens XA30 data - Updated
SpectralRegistrationHERMES.m- SNR limit is now estimated as in
RobustSpectralRegistration.m - Bug fix for indexing for output saved from maximum likelihood estimation
- SNR limit is now estimated as in
- Updated
dicm2niito version 2023.03.16 - Updated
export_figto v3.40 - Added Gannet documentation website URL to error dialog box
- Changed the way path names are printed in error dialog box
- Turned off iteration limit warning in
FitChoCr.m - Updated
UpdateGannet.mto ensure all sub-directories are added to the search path after updating - Added issue templates (in
.github/ISSUE_TEMPLATE) for blank issues, bug reports, and feature requests - Refined alignment of text/logos in output figures
- The units used for displaying textual results are now normalized to fit to any subplot dimension
- The textual results in the
GannetCoRegister,GannetSegment,CoReg, andSegoutput figures are now correctly centered
- The weighted signal averaging method used is now saved in the structure output
- The weighting factors calculated when applying weighted signal averaging are also now saved in the output
- Updated
SavePDF.msuch that when appending PDFs usingexport_fig, the figure size will now be equivalent in pixels on Windows and Mac systems - Updated
NIfTIMRSRead.m - Updated
README.md - Updated
GannetFitPhantom.m - Removed redundant global frequency shift in
RobustSpectralRegistration.m - The z-standardized MSEs calculated in the spectral registration subroutines are now saved in the structure output
- Updated
GannetVersion.mto also output version numbers of Gannet modules - A warning is now printed when users process Siemens .rda data encouraging them to instead use TWIX (.dat) data
- Added support for GE P-file header revision 30 (#28)
- MANY COSMETIC CHANGES
Bug fixes
- Bug fix for special character
\in Windows file path names printed in the error dialog box - Fixed bug in
GannetMask_NIfTI.mwhere the co-registered MRS voxel was incorrectly flipped in theGannetCoRegisteroutput figure - Fixed bug in
GannetQuantify.mwhere the alpha value was incorrectly being printed multiple times when multiple were run in batch - Added fix in
VersionCheck.mso that when users have limited or restricted internet access, an error is avoided (#27) - thanks @alexcraven!
3.3.1
New features
- Compressed NIfTI files (*.nii.gz) are now fully supported
- Gannet now fully quantifies metabolite levels for Cr, Cho, and NAA (estimated from the OFF
spectrum)
Major changes
- Moved local signal model functions out of
GannetFit.mand into their own files:BaselineModel.mCalcIU.mDoubleGaussModel.mEtOHModel.mGABAGlxModel.mGaussModel.mLorentzGaussModel.mLorentzGaussModelP.m
- Added
GetFullPath.m; Gannet now will find the full path of input files by default - Renamed some of the data-loading functions
Minor changes
- Added a check in
GannetQuantify.mfor datasets without water references;GannetQuantify.mwill
not run if no water references are present - Added a check in
GannetCoRegister.mto ensure all structural image files can be found - Updated
export_figto v3.33 - Updated
dicm2niito version 2023.03.08 - Updated
LICENSEandREADME.md - Updated
ExportToCSV.m - Updated
CoRegStandAlonefunctions - Replaced use of
1iwithcomplex() - Removed unused variable
T1max - Removed unnecessary
ones()parameter inLorentzModel.mandTwoLorentzModel.m - Philips *.spar file extension is no longer saved in the output structure
- Removed calculation of
dfinGannetLoad.m; addeddtin its place - Exported CSV files will no longer be overwritten if a CSV file of the same name already exists in
the output directory; instead, a new file is created and appended with an integer - Added new output structure attribute
nrows_water - Reordered structure subfields for metabolites in
GannetFit.mandExportToCSV.m - Shifted Gannet logo and version number in PDF outputs slightly to the right
- Alpha values are now included in exported CSV files
- Replaced the Gannet logo with a PNG version
- MANY COSMETIC CHANGES
Bug fixes
- Added a check for letter case of *.dcm and *.ima files in
DICOMRead.mandSiemensDICOMRead.m
(dir()is case-sensitive in Linux) - Added a fix to avoid an error where MATLAB tried to close figures following an unrelated internal
error, but no figures were created - Fixed a bug in
NIfTIMRSRead.mthat led to an error if theManufacturerfield is not found in
the data file header - If
export_fig.mcannot be found on the search path andappendhas been flagged in
GannetPreInitialise.m, it is made clear to the user that PDFs will be saved separately - Fixed bugs in
AlignUsingH2O.m - Fixed a bug in
SiemensDICOMRead.mwhere an error occurred ifcenterFreqis not found in the
data file header
3.3.0
New features
- Added functionality to read NIfTI-MRS files (Clarke et al., MRM, 2022) (
NIfTIMRSRead.m); includes additional new functionGannetMask_NIfTI.mfor voxel co-registration - Added support for Utah Siemens MEGA-PRESS sequence (DICOM files)
- Added support for CMRR PRESS data (DICOM files)
- Added support for Siemens XA30 sequence as provided by JHU
- Changed
READMEtoREADME.md, which now includes badges
Major changes
- Coil combination of GE, NIfTI-MRS, and Siemens TWIX files is now performed using generalized least squares (An et al., JMRI, 2013); this approach has been shown to result in optimal SNR and reduce spectral artifacts
- The Gannet logo has been reverted to the original image of a gannet
Minor changes
- Added functionality for GE data in
AlignSubSpectra_PreAlignRef.m - An error is presented if not enough inputs are given for any of the Gannet modules
- CoRegStandAlone outputs can be hidden if
MRS_struct.p.hideis set to1inCoRegStandAlone.m(default is0) - If the user has no internet connection,
VersionCheck.mandUpdateGannet.mwill not run - Updated dicm2nii to latest version (version 2022.09.15)
- Updated mapVBVD functions to latest version (https://github.com/pehses/mapVBVD)
- Turned off warnings of iteration limits in
SpectralRegistrationHERMES.mandGannetFit.m - Many cosmetic changes in the code
Bug fixes
- Fixed bug in error reporting in
GannetFit.m - CoRegStandAlone routines now parse version numbers from the main modules properly
- Variable
filesExistinGannetSegment.mmay not populate; it is now pre-initialized as a precaution - Bug fix in
GannetMask_SiemensRDA.m - Bug fixes for reading DICOM files
3.2.1
Minor changes
PhaseCorrection.mnow deals better with spectra that have a non-zero baseline- SPM12 now outputs a forward deformation field (needed for normalizing voxel masks to MNI space)
- Updated
export_figto v3.27 CoRegStandAlone.mnow exports a CSV file- Various cosmetic changes
Bug fixes
- Fixed sub-spectra alignment for GE HERCULES data
- Fixed bug in
CoRegStandAlone.m - Fixed bug in
read_dcm_header.m(thanks to Meredith Reid)
3.2.0
New features
- Added
GannetVersion.m,VersionCheck.m, andUpdateGannet.m; these new functions let users know the version of Gannet they have, if a newer release of Gannet is available, and will allow them to automatically update if wanted - Added
ToolboxCheck.mto check for missing MATLAB toolboxes needed to run Gannet - Error dialog boxes are displayed at the end of the analysis pipeline if an error occurred (during a batch analysis, Gannet will skip to the next dataset and continue running)
- Users can now choose to use weighted (the default) or conventional signal averaging in
GannetPreInitialise.m(outlier scans are removed when using conventional averaging, as before) - Added a new (optional) method for robust, weighted signal averaging: weighted averaging by criterion function minimization (WACFM) using the generalized Cauchy distribution as the cost function; see doi: 10.1016/j.bbe.2015.06.002 for more details; additionally, instead of weighting difference pairs, the subspectra of each editing subexperiment are weighted to generate weighted subspectra, which are then subtracted; see
SignalAveraging.m - Yair Altman's export_fig toolbox is included as an optional toolbox that, if added to MATLAB's search path, Gannet will use to append all output PDFs from each module into a single PDF (a flag must be set in
GannetPreInitialise.mto do this); this is very useful for easy QA of lots of data; note that Ghostscript needs to be installed for the appending of PDFs to work (NB: macOS users should use this version or use Homebrew to install Ghostscript) - Implemented use of hyperlinks in info and error messages printed in the command window so that users can: (1) directly run a certain function (such as
UpdateGannet.mwhenVersionCheck.minforms the user a new release is available); (2) go straight to the line of code where an encountered error can be fixed (such as errors inGannetPreInitialise.m); or (3) go to a website by clicking on the printed URL (such as to download SPM12); the relevant code has been borrowed from export_fig - Added an option in
GannetPreInitialise.mthat allows users, when using robust spectral registration, to use the averaged pre-aligned subspectra as references for aligning the averaged post-aligned subspectra (this may be helpful when robust spectral registration makes the alignment of already good-quality pre-aligned spectra worse) PaperPlot.mnow allows users to plot an exemplary voxel mask co-registered to the respective structural image- Added
GannetMask_GE_nii.m; GE users can now use NIfTI images instead of DICOMs to co-register their MRS voxels to structural images - Added the ability to trim datasets
- Extended the ability to concatenate files, including over multiple subjects
- Added a flag in
GannetPreInitialise.m(MRS_struct.p.hide) to prevent output figures from displaying (useful when processing a large batch of files)
Major changes
- The outdated manual PDF has been removed; up-to-date software documentation will now be found online: https://markmikkelsen.github.io/Gannet-docs/index.html
- Gannet is now licensed under the BSD 3-Clause License
- Alpha tissue correction is now performed on a by-metabolite basis rather than fixing the intrinsic WM:GM concentration to 1:2 (alpha) for all metabolites (assuming for now the ratio is 1:2 for GABA and Glx and 1:1 for GSH, EtOH and Lac); the alpha that is assumed is displayed in the GannetQuantify output figure
- Removed
MRS_struct.p.ON_OFF_orderfromGannetPreInitialise.m; the order of editing pulses is now determined automatically; the relevant code has been borrowed from Osprey (this has only been tested to a limited extent so may require further tweaking)- The exception to this change is phantom data, where users will still need to specify the order of editing pulses
Minor changes
- Datasets with differing number of averages can now be batch-processed together
- Turned off the progress bar displayed when loading Siemens TWIX data to reduce loading time
- Renamed some files for the sake of clarity and style; removed obsolete
GannetMask.m - Signal averaging and subtraction are now done in the new function
SignalAveraging.m - Various improvements to
RobustSpectralRegistration.m(formerlyRobust_Spectral_Registration.m) for better handling of data acquired using very strong water suppression - The assumed concentration of pure water in
GannetFit.mandGannetFitPhantom.m(PureWaterConc) has been changed from 55 to 55.51 mol/kg; this puts it in line with the same constant used inGannetQuantify.m - Added edits from Ralph Noeske (GE Berlin) to
GERead.mfor better handling of data whennechoes == 1; also changed the scaling factor ifnechoes > 1(hopefully this makes water-referenced measurements consistent across all data encoding flavors) - In
GERead.mandPhilipsRead_data.m, instead of using the first point in the FID for signal weighting, the most common point that is the max in the magnitude signal across all FIDs is now used - Some changes to
SiemensDICOMRead.mandDICOMRead.mfor smarter handling of data files: for each dataset, metabolite and water data files should be stored in separate folders - Improved
ExportToCSV.m; a single .csv file is now exported for HERMES datasets; useful variables such as signal areas and Cr fit quality metrics are now also exported - Rewrote
DiscernDataType.m(formerlyGannetDiscernDatatype.m) - Minor changes and improvements to
PaperPlot.m - Minor changes to
CoRegStandAlone.mfunctions - Minor changes to
SignalFilter.m - Simplified
EddyCurrentCorrection.m(formerlyphase_correction_fids.m) - Set up SPM12 for batch tissue segmentation only when tissue segmentation has not already been run and do it only once in a batch
AllFramesFT(for the last loaded dataset) is now also saved inMRS_struct.spec- When saving the MRS_struct structure, the .mat file is now saved using version 7.3 (for the rare case when the structure is >= 2 GB on 64-bit computers)
- Removed
MRS_struct.p.sdatfromGannetPreInitialise.mand the corresponding code fromGannetLoad.m(this feature was never really used by users afaik) - Improved global zero-order phasing in
SpectralRegistrationHERMES.m - Many cosmetic/aesthetic changes
- The module output figures now show information useful for reporting acquisition parameters and results (in line with the MRSinMRS checklist)
- Co-registered/segmented voxel masks displayed in GannetCoRegister, GannetSegment, and GannetQuantify output figures are now shown in yellow rather than grayscale
- Smarter stacking of HERMES difference spectra in
PlotPrePostAlign.mandPlotPrePostAlign2.m(formerlyGannetPlotPrePostAlign.mandGannetPlotPrePostAlign2.m) - The Gannet documentation website URL is printed at the bottom of every output figure
- Removed irrelevant messages from being printed in the command window during the analysis pipeline, replacing them with more useful messages
- Minor rearranging of results text in GannetSegment and GannetQuantify output figures
- Slight change to the y-axis labels of the Cr frequency spectrogram in the GannetLoad output figure
- Better reordering of
MRS_struct.outsubfields created inGannetFit.m
Bug fixes
- Frequency and phase offset estimates are now tracked correctly and saved when running any of the spectral registration-based alignment methods
- Removed old debugging conditional statement in
TWIXDeIdentify.m - Explicitly specify color of water frequency trace in GannetLoad output figure as there appears to be a bug since MATLAB R2019b when using
holdto overlay plots - Added EtOH signal parameters to
GannetQuantify.m - In
SiemensTwixRead.m, if no water reference is provided, use the most common point that is the max in the magnitude signal across all FIDs instead of just using the first point - Fixed an orientation problem in
GannetMask_GE.m - Removed unnecessary complex conjugate transpose during FFT of water data in
GannetLoad.m - Turned off warnings about legacy number generator in
RobustSpectralRegistration.m(for whenrngandrandnare run inSignalFilter.m) if they are already turned on