From 5a041e31493b62cca6aa213787c3e193f7ec08f4 Mon Sep 17 00:00:00 2001 From: Stephen L Date: Wed, 26 Feb 2020 12:57:06 +0100 Subject: [PATCH 1/2] update doc to work with Julia 1.3 Signed-off-by: Stephen L. --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 12766c5..dcfd0b0 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Magnitude and Phase images in NIfTI fileformat (4D images with echoes in the 4th Open the REPL in Julia and type ```julia -import Pkg; +using Pkg Pkg.add(PackageSpec(url="https://github.com/korbinian90/MRI.jl")) Pkg.add(PackageSpec(url="https://github.com/korbinian90/SWI.jl")) ``` @@ -35,15 +35,15 @@ nifti_folder = SWI.dir("test","testData","small") magfile = joinpath(nifti_folder, "Mag.nii") phasefile = joinpath(nifti_folder, "Phase.nii") -mag = readmag(magfile) -phase = readphase(phasefile) +mag = SWI.readmag(magfile) +phase = SWI.readphase(phasefile) data = Data(mag, phase, mag.header, TEs) -swi = calculateSWI(data) -mip = createMIP(swi) +swi = SWI.calculateSWI(data) +mip = SWI.createMIP(swi) -savenii(swi, "/swi.nii"; header=mag.header) -savenii(mip, "/mip.nii"; header=mag.header) +SWI.savenii(swi, "/swi.nii"; header=mag.header) +SWI.savenii(mip, "/mip.nii"; header=mag.header) ``` ## License From 9a9ec5f60a1a617b9dc329d34d79cda0950c059d Mon Sep 17 00:00:00 2001 From: Stephen L Date: Wed, 26 Feb 2020 13:02:58 +0100 Subject: [PATCH 2/2] add code comments and extend description to guide user Signed-off-by: Stephen L. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dcfd0b0..c1a0339 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Build Status](https://api.cirrus-ci.com/github/korbinian90/SWI.jl.svg)](https://cirrus-ci.com/github/korbinian90/SWI.jl) # Susceptibility Weighted Imaging (SWI) -SWI provides magnetic resonance images with improved vein and iron contrast by weighting the magnitude image with a preprocessed phase image. This package has the additional capability of multi-echo SWI, intensity correction and improved phase processing. +SWI provides magnetic resonance images with improved vein and iron contrast by weighting the magnitude image with a preprocessed phase image. This package has the additional capability of multi-echo SWI, intensity correction and improved phase processing. It can also work with classical single-echo SWI. ## Getting Started @@ -30,10 +30,10 @@ This is a simple multi-echo case without changing default behavior ```julia using SWI -TEs = [4,8,12] +TEs = [4,8,12] # change this to the Echo Time of your SWI sequence. For multi-echoes, set a list of TE values, else set a list with a single TE value. nifti_folder = SWI.dir("test","testData","small") -magfile = joinpath(nifti_folder, "Mag.nii") -phasefile = joinpath(nifti_folder, "Phase.nii") +magfile = joinpath(nifti_folder, "Mag.nii") # Path to the magnitude image in nifti format, must be .nii or .hdr +phasefile = joinpath(nifti_folder, "Phase.nii") # Path to the phase image mag = SWI.readmag(magfile) phase = SWI.readphase(phasefile) @@ -42,7 +42,7 @@ data = Data(mag, phase, mag.header, TEs) swi = SWI.calculateSWI(data) mip = SWI.createMIP(swi) -SWI.savenii(swi, "/swi.nii"; header=mag.header) +SWI.savenii(swi, "/swi.nii"; header=mag.header) # change with the path where you want to save the reconstructed SWI images SWI.savenii(mip, "/mip.nii"; header=mag.header) ```