Skip to content

Commit

Permalink
Merge pull request #3 from lrq3000/master
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
korbinian90 authored Feb 26, 2020
2 parents 845136a + 9a9ec5f commit 9f8da3d
Showing 1 changed file with 11 additions and 11 deletions.
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

0 comments on commit 9f8da3d

Please sign in to comment.