Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #3

Merged
merged 2 commits into from
Feb 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"))
```
Expand All @@ -30,20 +30,20 @@ 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 = 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, "<outputpath>/swi.nii"; header=mag.header)
savenii(mip, "<outputpath>/mip.nii"; header=mag.header)
SWI.savenii(swi, "<outputpath>/swi.nii"; header=mag.header) # change <outputpath> with the path where you want to save the reconstructed SWI images
SWI.savenii(mip, "<outputpath>/mip.nii"; header=mag.header)
```

## License
Expand Down