From 394b9bb883a16c907b861cfbe26418ac55acca86 Mon Sep 17 00:00:00 2001 From: Helge <47348963+HJZollner@users.noreply.github.com> Date: Thu, 26 Sep 2024 12:00:34 -0400 Subject: [PATCH 01/18] [BUG FIX] - ver command not working - pad.m - Anushree Bose - We are not using the pad.m function anyway and it was just kept for reference. Therefore we can simply delete this function to resolve the issue. --- libraries/pad/pad.m | 47 ------------------------------------------- settings/version.json | 4 ++-- 2 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 libraries/pad/pad.m diff --git a/libraries/pad/pad.m b/libraries/pad/pad.m deleted file mode 100644 index c1e7e28d..00000000 --- a/libraries/pad/pad.m +++ /dev/null @@ -1,47 +0,0 @@ -function A = pad(B, newSize, paddedWith) -% Matlab function to pad an array to a desired new size -% -% By: Christopher C. Wilcox, PhD -% Naval Research Laboratory -% Date: Mar 14, 2011 -% -% Usage: A = pad(B, newSize, [paddedWith]); -% Input: -% - B is the input array -% - newSize is a 2 element vector, [rows, cols], of the desired padded array -% - paddedWith (Optional) can be used to pad with NaNs or Zeros -% - 'nan' pads with NaNs (default) -% - 'zero' pads with Zeros -% -% Output: -% - A is the new array with the input array, B, surrounded by nans or -% zeros -% -% Modified by Helge Zoellner (Johns Hopkins University, 2020-05-11) hzoelln2@jhmi.edu -% to add zeros in to 1-D FIDs. - - -if nargin > 1 - if nargin == 3 - if strcmp(paddedWith, 'zero') - A = zeros(newSize,1); - elseif strcmp(paddedWith, 'nan') - A = nan(newSize,1); - else - error('Unrecognized token for padding value'); - end - else - A = nan(newSize); - end -else - error('Enter parameters for the new padded array'); -end - -[m, ~] = size(A); -[q, ~] = size(B); - -if m < q - error('The desired new array must be at least the size of the starting array'); -end - A(1:q, :) = B; -end \ No newline at end of file diff --git a/settings/version.json b/settings/version.json index fe88eae1..2bd58c6f 100644 --- a/settings/version.json +++ b/settings/version.json @@ -1,3 +1,3 @@ -{"Version": "2.8.0", - "Date": "September 23, 2024", +{"Version": "2.8.1", + "Date": "September 26, 2024", "Description": "First digit for major releases, second digit for regular compiled releases, third digit for each commit to the develop branch. "} From 24746b17667f3b9a289c17443362e4594e5a5733 Mon Sep 17 00:00:00 2001 From: Alexander R Craven <12934018+alexcraven@users.noreply.github.com> Date: Wed, 2 Oct 2024 14:09:57 +0200 Subject: [PATCH 02/18] Fix mICheckBox, sICheckBox in osp_create_job_file Commit 18a3692 updated the names of Ins and Scyllo, but the old checkbox names remained in the interactive job builder, causing it to fail when using a custom selection of metabolites. --- job/osp_create_job_file.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/job/osp_create_job_file.m b/job/osp_create_job_file.m index ada3c4cb..83477315 100644 --- a/job/osp_create_job_file.m +++ b/job/osp_create_job_file.m @@ -82,14 +82,14 @@ if app.GluCheckBox.Value, fprintf(fid,'%s',',"Glu"'); end if app.GlyCheckBox.Value, fprintf(fid,'%s',',"Gly"'); end if app.H2OCheckBox.Value, fprintf(fid,'%s',',"H2O"'); end - if app.InsCheckBox.Value, fprintf(fid,'%s',',"mI"'); end + if app.mICheckBox.Value, fprintf(fid,'%s',',"mI"'); end if app.LacCheckBox.Value, fprintf(fid,'%s',',"Lac"'); end if app.NAACheckBox.Value, fprintf(fid,'%s',',"NAA"'); end if app.NAAGCheckBox.Value, fprintf(fid,'%s',',"NAAG"'); end if app.PChCheckBox.Value, fprintf(fid,'%s',',"PCh"'); end if app.PCrCheckBox.Value, fprintf(fid,'%s',',"PCr"'); end if app.PECheckBox.Value, fprintf(fid,'%s',',"PE"'); end - if app.ScylloCheckBox.Value, fprintf(fid,'%s',',"sI"'); end + if app.sICheckBox.Value, fprintf(fid,'%s',',"sI"'); end if app.SerCheckBox.Value, fprintf(fid,'%s',',"Ser"'); end if app.TauCheckBox.Value, fprintf(fid,'%s',',"Tau"'); end if app.TyrosCheckBox.Value, fprintf(fid,'%s',',"Tyros",'); end @@ -180,4 +180,4 @@ fprintf(fid,'\n%s','}'); fclose(fid); -jobm = mfile; \ No newline at end of file +jobm = mfile; From 7c6d5de9c8ab1bbeb319798f6320f27b509eef27 Mon Sep 17 00:00:00 2001 From: Carl Helmick Date: Thu, 17 Oct 2024 19:00:48 -0300 Subject: [PATCH 03/18] [BUG FIX] in osp_WriteBIDsTable to prevent trying to save emtpy table --- utilities/osp_WriteBIDsTable.m | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/utilities/osp_WriteBIDsTable.m b/utilities/osp_WriteBIDsTable.m index fe36f7a9..f62c9bf9 100644 --- a/utilities/osp_WriteBIDsTable.m +++ b/utilities/osp_WriteBIDsTable.m @@ -12,17 +12,22 @@ writetable(Table,[OutLoc,'.txt'],'Delimiter','\t'); % Write table with tab delimiter movefile([OutLoc,'.txt'],[OutLoc,'.tsv']); % Change file extension to tsv +fprintf('Writing table to file = %s\n', [OutLoc,'.tsv']); -for JJ=1:length(Table.Properties.VariableNames) - JSON.(Table.Properties.VariableNames{JJ}).LongName = Table.Properties.CustomProperties.VariableLongNames{JJ}; - JSON.(Table.Properties.VariableNames{JJ}).Description = Table.Properties.VariableDescriptions{JJ}; - JSON.(Table.Properties.VariableNames{JJ}).Units = Table.Properties.VariableUnits{JJ}; - %JSON.(Table.Properties.VariableNames{JJ}).TermURL = Table.Properties.CustomProperties.VariableTermURL{JJ}; +if length(Table.Properties.VariableNames) > 0 + for JJ=1:length(Table.Properties.VariableNames) + JSON.(Table.Properties.VariableNames{JJ}).LongName = Table.Properties.CustomProperties.VariableLongNames{JJ}; + JSON.(Table.Properties.VariableNames{JJ}).Description = Table.Properties.VariableDescriptions{JJ}; + JSON.(Table.Properties.VariableNames{JJ}).Units = Table.Properties.VariableUnits{JJ}; + %JSON.(Table.Properties.VariableNames{JJ}).TermURL = Table.Properties.CustomProperties.VariableTermURL{JJ}; + end + + % Write json structure to text file following jsonencode + json_fn = [OutLoc,'.json']; + fprintf('Writing table to file = %s\n', json_fn); + fid=fopen(json_fn,'w'); + fprintf(fid, jsonencode(JSON)); + fclose(fid); end -% Write json structure to text file following jsonencode -fid=fopen([OutLoc,'.json'],'w'); -fprintf(fid, jsonencode(JSON)); -fclose(fid); - end \ No newline at end of file From 587df7e1b34425a70ab2a877f89a36bb66086a15 Mon Sep 17 00:00:00 2001 From: Helge <47348963+HJZollner@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:25:43 -0500 Subject: [PATCH 04/18] Update version - prepare for external pull request #790 --- settings/version.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/version.json b/settings/version.json index 2bd58c6f..088a0edc 100644 --- a/settings/version.json +++ b/settings/version.json @@ -1,3 +1,3 @@ -{"Version": "2.8.1", - "Date": "September 26, 2024", +{"Version": "2.8.2", + "Date": "November 7, 2024", "Description": "First digit for major releases, second digit for regular compiled releases, third digit for each commit to the develop branch. "} From 7053a64a21e128ef3aa135f4f07921efaa74f099 Mon Sep 17 00:00:00 2001 From: Helge <47348963+HJZollner@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:52:08 -0500 Subject: [PATCH 05/18] [BUG FIX] - Recent osp_combineCoils breaks compatibility with GE P-file loader (and presumably others) - Alex & Steve - remove index from string comparison as suggested by Alex --- process/osp_combineCoils.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/osp_combineCoils.m b/process/osp_combineCoils.m index 21181123..d964104b 100644 --- a/process/osp_combineCoils.m +++ b/process/osp_combineCoils.m @@ -44,7 +44,7 @@ metab_ll = MRSCont.opts.MultipleSpectra.metab(ll); % For SPECIAL acquisitions, some of the sub-spectra need to be combined % prior to determining the CC coefficients. We'll set a flag here. - isSpecial = strcmpi(MRSCont.raw_uncomb{metab_ll,kk}.seq(1), 'special'); + isSpecial = strcmpi(MRSCont.raw_uncomb{metab_ll,kk}.seq, 'special'); MRSCont.flags.isSPECIAL = isSpecial; % Check if reference scans exist, if so, get CC coefficients from there if MRSCont.flags.hasRef From 2c47a4a50dd69ea9898fbfc3080b981f3df732a1 Mon Sep 17 00:00:00 2001 From: Helge <47348963+HJZollner@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:52:35 -0500 Subject: [PATCH 06/18] Update version Update version --- settings/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/version.json b/settings/version.json index 088a0edc..de026eca 100644 --- a/settings/version.json +++ b/settings/version.json @@ -1,3 +1,3 @@ -{"Version": "2.8.2", +{"Version": "2.8.3", "Date": "November 7, 2024", "Description": "First digit for major releases, second digit for regular compiled releases, third digit for each commit to the develop branch. "} From 994c3b06c8571e455ec2a2155f231af9ce941228 Mon Sep 17 00:00:00 2001 From: Helge <47348963+HJZollner@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:16:39 -0500 Subject: [PATCH 07/18] [BUG FIX] - OspreyLoad cannot read GE data with extension .7.anon - osp_detDataType.m - Steve Hui - fixed the GE anon case which was skipped due to name comparison --- load/osp_detDataType.m | 2 +- settings/version.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/load/osp_detDataType.m b/load/osp_detDataType.m index 3df3a5d3..a2449ade 100644 --- a/load/osp_detDataType.m +++ b/load/osp_detDataType.m @@ -153,7 +153,7 @@ buffer.vendor{kk} = 'GE'; buffer.datatype{kk} = 'P'; MRSCont.flags.hasRef = 1; - elseif strcmpi(ext,'.anon') && contains(name, '.7.anon') + elseif strcmpi(ext,'.anon') && contains(name, '.7') buffer.vendor{kk} = 'GE'; buffer.datatype{kk} = 'P'; MRSCont.flags.hasRef = 1; diff --git a/settings/version.json b/settings/version.json index de026eca..8832ec9c 100644 --- a/settings/version.json +++ b/settings/version.json @@ -1,3 +1,3 @@ -{"Version": "2.8.3", +{"Version": "2.8.4", "Date": "November 7, 2024", "Description": "First digit for major releases, second digit for regular compiled releases, third digit for each commit to the develop branch. "} From 6803d565336a0f05030f99b4ed907e70155b0930 Mon Sep 17 00:00:00 2001 From: Helge <47348963+HJZollner@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:31:26 -0500 Subject: [PATCH 08/18] Update 05-tutorial_cmd.Rmd --- docs_source/05-tutorial_cmd.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs_source/05-tutorial_cmd.Rmd b/docs_source/05-tutorial_cmd.Rmd index e50b139a..bc5d9be2 100644 --- a/docs_source/05-tutorial_cmd.Rmd +++ b/docs_source/05-tutorial_cmd.Rmd @@ -32,8 +32,8 @@ MRSCont = OspreyFit(MRSCont); Modeling results are added to the MRSCont.fit, including results tables. If we have structural data, we can coregister our voxels, and perform tissue segmentation: ```octave -MRScont = OspreyCoreg(MRSCont); -MRScont = OspreySeg(MRSCont); +MRSCont = OspreyCoreg(MRSCont); +MRSCont = OspreySeg(MRSCont); ``` MRSCont now has sub-structures relating to voxel masks and volumes, MRSCont.coreg, and tissue segmentation results in MRSCont.seg. From 5f3cdf6d0f9837d35db214f7f2bfcbff466338e6 Mon Sep 17 00:00:00 2001 From: Helge <47348963+HJZollner@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:28:29 -0500 Subject: [PATCH 09/18] [BUG FIX] - Inconsistent mapping of .seq parameter in nii_hdr_ext - osp_generate_nii_hdr_ext - Alex Craven - fixed mapping between .seq Osprey struct and nifti header generation. --- settings/version.json | 2 +- utilities/osp_generate_nii_hdr_ext.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/version.json b/settings/version.json index 8832ec9c..cfdca35f 100644 --- a/settings/version.json +++ b/settings/version.json @@ -1,3 +1,3 @@ -{"Version": "2.8.4", +{"Version": "2.8.5", "Date": "November 7, 2024", "Description": "First digit for major releases, second digit for regular compiled releases, third digit for each commit to the develop branch. "} diff --git a/utilities/osp_generate_nii_hdr_ext.m b/utilities/osp_generate_nii_hdr_ext.m index 257e9d02..d2ec17fd 100644 --- a/utilities/osp_generate_nii_hdr_ext.m +++ b/utilities/osp_generate_nii_hdr_ext.m @@ -45,7 +45,7 @@ nii_hdr_ext.TxOffset = double(0); nii_hdr_ext.Manufacturer = in.Manufacturer; nii_hdr_ext.SoftwareVersions = in.software; - nii_hdr_ext.ProtocolName = in.seq; + nii_hdr_ext.SequenceName = in.seq; nii_hdr_ext.PatientPosition = in.PatientPosition; nii_hdr_ext.ConversionMethod = OspreyVersion; nii_hdr_ext.ConversionTime = datestr(now,30); From e86c3a5e0003e661e1d256100183cabced7a2165 Mon Sep 17 00:00:00 2001 From: Georg Oeltzschner Date: Mon, 25 Nov 2024 12:40:09 -0500 Subject: [PATCH 10/18] Fix typo in documentation #789 --- docs/404.html | 16 +- docs/faqs.html | 12 +- docs/getting-started.html | 60 +- docs/index.html | 16 +- docs/osprey-basis-set-tools.html | 36 +- docs/osprey-command-line-tutorial.html | 36 +- docs/osprey-gui-tutorial.html | 48 +- docs/reference-keys.txt | 2 + docs/the-osprey-job-file.html | 976 +++++++++++++------------ docs/the-osprey-workflow.html | 14 +- 10 files changed, 627 insertions(+), 589 deletions(-) diff --git a/docs/404.html b/docs/404.html index 5f2c1f56..bc58e53c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -6,7 +6,7 @@ Page not found | Osprey Documentation - + @@ -23,7 +23,7 @@ - + @@ -92,7 +92,7 @@ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ -code span.bu { } /* BuiltIn */ +code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ @@ -105,7 +105,7 @@ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ -code span.im { } /* Import */ +code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ @@ -119,6 +119,10 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ + @@ -165,13 +169,13 @@
  • 4.3.2 Sub-spectral alignment
  • 4.3.3 Eddy-current correction
  • 4.3.4 Saving data to external formats
  • -
  • 4.3.5 Matbolites included in the basis-set
  • +
  • 4.3.5 Metabolites included in the basis-set
  • 4.3.6 LCModel-specific options
  • 4.3.7 Fit style
  • 4.3.8 Fitting range
  • 4.3.9 Baseline knot spacing
  • 4.3.10 Macromolecule and lipid signals
  • -
  • 4.3.11 Co-edited macrommolecules
  • +
  • 4.3.11 Co-edited macromolecules
  • 4.4 Specifying MRS data and structural imaging files
  • 4.4 Specifying MRS data and structural imaging files
  • 4.4 Specifying MRS data and structural imaging files
  • 4.4 Specifying MRS data and structural imaging files
      @@ -167,11 +171,11 @@

      Osprey

      -

      +

      Osprey is an all-in-one software suite for state-of-the art processing and quantitative analysis of in-vivo magnetic resonance spectroscopy (MRS) data.

      diff --git a/docs/osprey-basis-set-tools.html b/docs/osprey-basis-set-tools.html index 854e216b..0fdaf63c 100644 --- a/docs/osprey-basis-set-tools.html +++ b/docs/osprey-basis-set-tools.html @@ -6,7 +6,7 @@ Chapter 7 Osprey basis set tools | Osprey Documentation - + @@ -23,7 +23,7 @@ - + @@ -92,7 +92,7 @@ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ -code span.bu { } /* BuiltIn */ +code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ @@ -105,7 +105,7 @@ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ -code span.im { } /* Import */ +code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ @@ -119,6 +119,10 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ + @@ -165,13 +169,13 @@
    • 4.3.2 Sub-spectral alignment
    • 4.3.3 Eddy-current correction
    • 4.3.4 Saving data to external formats
    • -
    • 4.3.5 Matbolites included in the basis-set
    • +
    • 4.3.5 Metabolites included in the basis-set
    • 4.3.6 LCModel-specific options
    • 4.3.7 Fit style
    • 4.3.8 Fitting range
    • 4.3.9 Baseline knot spacing
    • 4.3.10 Macromolecule and lipid signals
    • -
    • 4.3.11 Co-edited macrommolecules
    • +
    • 4.3.11 Co-edited macromolecules
  • 4.4 Specifying MRS data and structural imaging files