Skip to content

Commit

Permalink
Add rm
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffFessler committed Dec 26, 2019
1 parent e3ea6ce commit 23dd3ac
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@ File I/O routines for
[MIRT (Michigan Image Reconstruction Toolbox) in Julia](https://github.com/JeffFessler/MIRT.jl)

This code is isolated from the main MIRT.jl toolbox,
because testing these functions
because complete tests of these functions
requires large files
that are not part of the repo.
By such isolation,
the code coverage reported
over at
[MIRT.jl](https://github.com/JeffFessler/MIRT.jl)
is representative of the algorithms there,
separate from I/O issues.

The primary functions exported are for reading GE MRI kspace data:
* `loadpfile`
* `read_rdb_hdr`

Utility functions for reading and writing fixed-length structured headers,
which are common in legacy medical imaging formats,
are in `src/ge-mri/header.jl`,
such as `header_read` and `header_write`.

This software was developed at the
[University of Michigan](https://umich.edu/)
by
[Jeff Fessler](http://web.eecs.umich.edu/~fessler)
and his
[group](http://web.eecs.umich.edu/~fessler/group).

This code is a package dependency of MIRT.jl,
This code is a package dependency of
[MIRT.jl](https://github.com/JeffFessler/MIRT.jl)
so most users will never clone this repo directly.
Installing MIRT
by following the instructions at
https://github.com/JeffFessler/MIRT.jl
will automatically include this code
through the magic of Julia's package manager.

Tested with Julia 1.1, 1.2, 1.3
Tested with Julia 1.0.5, 1.3, and should work with 1.1, 1.2.
2 changes: 2 additions & 0 deletions src/fastmri/hdf5utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ function h5_get_test(test::Symbol)
h5open(filename, "r") do fid
@test getcomplextype(fid["kspace"]) == ComplexF32
end

rm(filename)
true
end

Expand Down
2 changes: 2 additions & 0 deletions src/ge-mri/header.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ function header_test(test::Symbol)
@test all([hu[i] == ht[i] for i=2:length(hu)])
end

rm(tname)

true
end

Expand Down
4 changes: 2 additions & 2 deletions src/ge-mri/pfile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ function loadpfile(fid::IOStream ;
memfree = Sys.total_memory() # system total memory
mempercentuse = 100 * memneeded / memfree
(mempercentuse > 100) &&
(@warn("Loading data ($(memneeded/1e9) GB) may exceed available RAM");
@warn("This could freeze computer!"))
@warn("Loading data ($(memneeded/1e9) GB) may exceed available RAM and freeze system")
# fprintf('Press enter to continue anyway...');
# input('');
(mempercentuse > 90) && # Warn if we will we use 90% of memory
Expand Down Expand Up @@ -259,6 +258,7 @@ function loadpfile(test::Symbol)
write(fid, fdat)
end
loadpfile(tname ; quiet=true)
rm(tname)

true
end

0 comments on commit 23dd3ac

Please sign in to comment.