Skip to content
Commits on Source (78)
......@@ -53,7 +53,7 @@ matrix:
- sudo apt-get update -qq
- sudo apt-get install -qq liblapacke-dev liblapack-dev
- env: OMP=0
- env: OMP=0 CFLAGS=-fblocks LDFLAGS=-lBlocksRuntime
os: linux
compiler: clang
sudo: required
......@@ -67,7 +67,7 @@ matrix:
- make utest
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq liblapacke-dev
- sudo apt-get install -qq liblapacke-dev libblocksruntime-dev
- env: OMP=1
os: linux
......@@ -99,7 +99,7 @@ matrix:
- sudo apt-get update -qq
- sudo apt-get install -qq liblapack-dev
- env: CUDA=1 CUDA_BASE=/usr/local/cuda-7.5/
- env: CUDA=1 CUDA_BASE=/usr/local/cuda-7.5/ CFLAGS=-fblocks LDFLAGS=-lBlocksRuntime
os: linux
compiler: clang-3.5
sudo: required
......@@ -114,7 +114,7 @@ matrix:
- sudo apt-get update -qq
- sudo apt-get install -qq clang-3.5
- sudo apt-get install -qq --no-install-recommends cuda-drivers cuda-core-7.5 cuda-cudart-dev-7.5 cuda-cufft-dev-7.5 cuda-cublas-dev-7.5
- sudo apt-get install -qq liblapacke-dev
- sudo apt-get install -qq liblapacke-dev libblocksruntime-dev
- env: BUILD_NAME="CMake"
os: linux
......@@ -156,7 +156,6 @@ matrix:
- env: BUILD_NAME="CMake + CUDA" CUDA_BASE=/usr/local/cuda-7.5/
os: linux
compiler: clang-3.5
sudo: required
dist: trusty
addons:
......@@ -196,16 +195,6 @@ matrix:
- CC=gcc CXX=g++ cmake -DLINALG_VENDOR=LAPACKE -DLAPACKE_DIR=/usr/lib -DUSE_MATLAB=OFF -DUSE_CUDA=ON -DCUDA_TOOLKIT_ROOT_DIR=${CUDA_BASE} ..
- make
- env: MACPORTS=0
os: osx
compiler: gcc-4.8
script:
- make test
# make utest
before_install:
- brew update
- brew install fftw gcc48 homebrew/science/openblas
script:
- make bart
- make all
......@@ -11,7 +11,7 @@ enable_language(C)
macro(use_c99)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set (CMAKE_C_FLAGS "--std=gnu99 ${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "--std=gnu11 ${CMAKE_C_FLAGS}")
endif ()
else ()
set (CMAKE_C_STANDARD 99)
......@@ -264,20 +264,20 @@ install(TARGETS bartsupport
ARCHIVE DESTINATION lib/static)
## PASS #1: Build stand-alone programs
## Generate stand alone programs
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/StandAloneCode)
foreach(curr_prog ${ALLPROGS})
CONFIG_BY_REPLACEMENT( ${CMAKE_CURRENT_LIST_DIR}/src/main.c ${CMAKE_CURRENT_BINARY_DIR}/StandAloneCode/${curr_prog}.c
"/* Generated by cmake */"
"main_real" "main_${curr_prog}")
bart_add_executable(${curr_prog} ${CMAKE_CURRENT_BINARY_DIR}/StandAloneCode/${curr_prog}.c ${CMAKE_CURRENT_LIST_DIR}/src/${curr_prog}.c)
target_link_libraries(${curr_prog} bartsupport )
install(TARGETS ${curr_prog}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static)
endforeach()
### PASS #1: Build stand-alone programs
### Generate stand alone programs
#file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/StandAloneCode)
#foreach(curr_prog ${ALLPROGS})
# CONFIG_BY_REPLACEMENT( ${CMAKE_CURRENT_LIST_DIR}/src/main.c ${CMAKE_CURRENT_BINARY_DIR}/StandAloneCode/${curr_prog}.c
# "/* Generated by cmake */"
# "main_real" "main_${curr_prog}")
# bart_add_executable(${curr_prog} ${CMAKE_CURRENT_BINARY_DIR}/StandAloneCode/${curr_prog}.c ${CMAKE_CURRENT_LIST_DIR}/src/${curr_prog}.c)
# target_link_libraries(${curr_prog} bartsupport )
# install(TARGETS ${curr_prog}
# RUNTIME DESTINATION bin
# LIBRARY DESTINATION lib
# ARCHIVE DESTINATION lib/static)
#endforeach()
## More crafty file manipulation so that we maintain backward comaptibility
## with the Makefile
......@@ -327,7 +327,7 @@ install(TARGETS bart
#==============================================
# TODO: Matlab code
option(USE_MATLAB "Specify if the optional matlab programs should be built" ON)
option(USE_MATLAB "Specify if the optional matlab programs should be built" OFF)
if(USE_MATLAB)
find_package(Matlab REQUIRED)
if(MATLAB_FOUND)
......
Copyright (c) 2013-2017. The Regents of the University of California.
Copyright (c) 2013-2017. BART Developer Team and Contributors.
Copyright (c) 2012. Intel Coorperation. (src/lapacke/)
Copyright (c) 2012. Intel Corporation. (src/lapacke/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
......@@ -24,7 +24,7 @@ FFTWTHREADS?=1
ISMRMRD?=0
DESTDIR ?= /
PREFIX ?= usr/
PREFIX ?= usr/local/
BUILDTYPE = Linux
UNAME = $(shell uname -s)
......@@ -91,7 +91,7 @@ CFLAGS ?= $(OPT) -Wmissing-prototypes
CXXFLAGS ?= $(OPT)
ifeq ($(BUILDTYPE), MacOSX)
CC ?= gcc-mp-4.7
CC ?= gcc-mp-6
else
CC ?= gcc
# for symbols in backtraces
......
......@@ -49,6 +49,9 @@ Updates and further information can be found here:
GCC compiler, the FFTW library, and optionally CUDA.
(see recon/Makefile to turn options on or off)
It should be possible to use the clang compiler, but older
version before version 4.0 are known to cause problems.
The software can be used in combination with Matlab or octave.
......@@ -81,11 +84,11 @@ To install the required libraries on Debian and Ubuntu run:
### 2.1.2. Mac OS X
Xcode is required and it is recommended to install a newer version
of gcc (4.7 seems to work) from MacPorts (http://www.macports.org/).
of gcc from MacPorts (http://www.macports.org/).
$ sudo port install fftw-3-single
$ sudo port install gcc47
$ sudo port install gcc6
$ sudo port install libpng
$ sudo port install openblas
......
bart (0.4.03-1) UNRELEASED; urgency=medium
* New upstream version.
* Update copyright file.
* Fix install.
* Standards-Version: 4.1.4
* Secure url for copyright format.
-- Martin Uecker <martin.uecker@med.uni-goettingen.de> Fri, 27 Apr 2018 21:34:11 +0200
bart (0.4.02-2) unstable; urgency=medium
* Turn off unit tests on some architectures.
......
......@@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 10),
liblapack-dev | liblapack.so,
libpng-dev,
liblapacke-dev
Standards-Version: 4.1.1
Standards-Version: 4.1.4
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/bart.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/bart.git
Homepage: https://mrirecon.github.io/bart/
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: BART
Upstream-Contact: Martin Uecker <martin.uecker@med.uni-goettingen.de>
Source: https://github.com/mrirecon/bart
Files: *
Copyright: 2013-2017 The Regents of the University of California
2015-2017 Martin Uecker
Copyright: 2013-2018 The Regents of the University of California
2015-2018 Martin Uecker
2017 Massachusetts Institute of Technology
2017 University of Oxford
2012,2017 Intel Corporation
......@@ -15,7 +15,7 @@ Copyright: 2013-2017 The Regents of the University of California
2016 David Smith
2016 Hans Johnson
2017 Nguyen Damien
2017 Christian Holme
2017-2018 Christian Holme
2017 Sebastian Rosenzweig
License: BSD-3-clause
All rights reserved.
......
......@@ -7,7 +7,7 @@ Subject: remove empty directory
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 834698d..72b1829 100644
index bccc92c..eeceb3d 100644
--- a/Makefile
+++ b/Makefile
@@ -495,7 +495,6 @@ install: bart $(root)/doc/commands.txt
......
From: Martin Uecker <martin.uecker@med.uni-goettingen.de>
Date: Sun, 26 Nov 2017 12:57:46 +0100
Subject: bump version
---
version.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/version.txt b/version.txt
index 26a1a7e..495f58b 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-v0.4.01
+v0.4.02
0001-remove-empty-directory.patch
0002-bump-version.patch
......@@ -12,6 +12,9 @@ NOTEST_ARCHS=i386 mips mipsel hurd-i386 kfreebsd-i386 m68k sh4
%:
dh $@
override_dh_install:
PREFIX=$(shell pwd)/debian/$(NAME) make install
override_dh_auto_test:
ifeq (,$(filter $(NOTEST_ARCHS), $(DEB_BUILD_ARCH)))
make utest
......
......@@ -12,11 +12,15 @@ Software Toolbox and Programming Library for Compressed Sensing and
Parallel Imaging,
ISMRM Workshop on Data Sampling and Image Reconstruction, Sedona 2013.
Tamir JI, Ong F, Cheng JY, Uecker M, Lustig M. Generalized Magnetic
Resonance Image Reconstruction using The Berkeley Advanced
Reconstruction Toolbox,
ISMRM Workshop on Data Sampling and Image Reconstruction, Sedona 2016.
- sensitivity-encoded parallel imaging -
(commands: itsense, pocsense, bpsense, rsense, pics)
(commands: itsense, pocsense, bpsense, pics)
Ra JB and Rim CY.
......@@ -58,6 +62,11 @@ trajectories.
Annual Meeting of the ISMRM, Glasgow 2001,
In: Proc Intl Soc Mag Reson Med 9; 767.
Uecker M, Zhang S, Frahm J.
Nonlinear Inverse Reconstruction for Real-time MRI of the
Human Heart Using Undersampled Radial FLASH.
Magn Reson Med 2010; 63:1456-1462.
Ong F, Uecker M, Jiang W, Lustig M.
Fast Non-Cartesian Reconstruction with Pruned Fast Fourier Transform.
Annual Meeting ISMRM, Toronto 2015,
......@@ -119,6 +128,11 @@ Calibrationless Parallel Imaging Reconstruction Based on Structured
Low-Rank Matrix Completion.
Magn Reson Med 2014; 72:959-970.
Holme HCM, Rosenzweig S, Ong F, Wilke RN, Lustig M, Uecker M.
ENLIVE: An Efficient Nonlinear Method for Calibrationless and
Robust Parallel Imaging.
arXiv:1706.09780 [physics.med-ph]
......@@ -169,7 +183,7 @@ Magn Reson Med 2009; 61:145-152.
- sparsity transforms, variational penalties, regularization -
(commands: cdf97, rof, lrmatrix, pocsense, rsense, pics)
(commands: cdf97, rof, lrmatrix, pocsense, pics)
Rudin LI, Osher S, Fatemi E.
......@@ -177,7 +191,7 @@ Nonlinear total variation based noise removal algorithms,
Physica D: Nonlinear Phenomena 1992; 60:259-268.
Figueiredo MAT and Nowak RD.
An EM algorithm for wavelet-based image restoration
An EM algorithm for wavelet-based image restoration.
IEEE Trans Image Process 2003; 12:906-916.
Ong F, Uecker M, Tariq U, Hsiao A, Alley MT, Vasanawala SS, Lustig M.
......@@ -186,8 +200,7 @@ Magn Reson Med 2015; 73:828-842.
Ong F, Lustig M.
Beyond low rank + sparse: Multi-scale low rank matrix decomposition,
preprint 2015; arXiv:1507.08751.
IEEE J Sel Topics Signal Process 2016; 10:672-687.
......@@ -283,10 +296,25 @@ Radiology 2016; 278:245-256.
Cheng JY, Hanneman K, Zhang T, Alley MT, Lai P, Tamir JI, Uecker M,
Pauly JM, Lustig M, Vasanawala SS.
Comprehensive Motion-Compensated Highly-Accelerated 4D Flow MRI with
Ferumoxytol Enhancement for Pediatric Congenital Heart Disease,
J Magn Reson Imaging, Epub (2015)
Ferumoxytol Enhancement for Pediatric Congenital Heart Disease.
J Magn Reson Imaging 2016; 43:1355-1368.
Tamir JI, Uecker M, Chen W, Lai P, Aleey MT, Vasanawala SS, Lustig M.
T2-Shuffling: Sharp, Multi-Contrast, Volumetric Fast Spin-Echo Imaging
Magn Recon Med; in press (2015).
T2-Shuffling: Sharp, Multi-Contrast, Volumetric Fast Spin-Echo Imaging.
Magn Recon Med 2017; 77:180-195.
Uecker M, Lustig M.
Estimating Absolute-Phase Maps Using ESPIRiT and Virtual Conjugate Coils.
Magn Reson Med 2017; 77:1201-1207.
Moghari MH, Uecker M, Roujol S, Sabbagh M, Geva T, Powell AJ.
Accelerated Whole-heart Magnetic Resonance Angiography Using
a Variable-Density Poisson-Disc Undersampling Pattern and
Compressed Sensing Reconstruction.
Magn Reson Med 2018; 79:761-769.
Cheng JY, Zhang T, Alley MT, Uecker M, Lustig M, Pauly JM, Vasanawala SS.
Comprehensive Multi-Dimensional MRI for the Simultaneous Assessment
of Cardiopulmonary Anatomy and Physiology.
Scientific Reports 2017; 7:5330.
......@@ -19,4 +19,4 @@ DOTHIS := $(shell $(root)/rules/update-version.sh)
$(srcdir)/misc/version.o: $(srcdir)/misc/version.inc
UTARGETS += test_pattern
UTARGETS += test_pattern test_types
......@@ -18,5 +18,5 @@ lib/libnum.a: libnum.a($(numobjs))
UTARGETS += test_multind test_flpmath test_splines test_linalg test_polynom test_window
UTARGETS += test_blas
UTARGETS += test_blas test_mdfft
#!/bin/bash
# Copyright 2018. Martin Uecker.
# All rights reserved. Use of this source code is governed by
# a BSD-style license which can be found in the LICENSE file.
#
# Authors:
# 2018 Martin Uecker <martin.uecker@med.uni-goettingen.de>
#
# Memory-saving ESPIRiT
#
set -e
LOGFILE=/dev/stdout
title=$(cat <<- EOF
ESPIRiT-ECON
EOF
)
helpstr=$(cat <<- EOF
-l logfile
-h help
EOF
)
usage="Usage: $0 [-h] <kspace> <output>"
echo "$title"
echo
while getopts "hl:" opt; do
case $opt in
h)
echo "$usage"
echo
echo "$helpstr"
exit 0
;;
l)
LOGFILE=$(readlink -f "$OPTARG")
;;
\?)
echo "$usage" >&2
exit 1
;;
esac
done
shift $((OPTIND - 1))
if [ $# -lt 2 ] ; then
echo "$usage" >&2
exit 1
fi
export PATH=$TOOLBOX_PATH:$PATH
input=$(readlink -f "$1")
output=$(readlink -f "$2")
if [ ! -e $input.cfl ] ; then
echo "Input file does not exist." >&2
echo "$usage" >&2
exit 1
fi
if [ ! -e $TOOLBOX_PATH/bart ] ; then
echo "\$TOOLBOX_PATH is not set correctly!" >&2
exit 1
fi
#WORKDIR=$(mktemp -d)
# Mac: http://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x
WORKDIR=`mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir'`
trap 'rm -rf "$WORKDIR"' EXIT
cd $WORKDIR
# start group for redirection of output to the logfile
{
XX=$(bart show -d0 $input)
YY=$(bart show -d1 $input)
ZZ=$(bart show -d2 $input)
DIM=2
# To decouple along another dimension:
# 1. change DIM
# 2. replace ZZ below
# 3. change the ecaltwo command
bart ecalib -1 $input eon
# zero-pad
bart fft $(bart bitmask ${DIM}) eon eon_fft
bart resize -c ${DIM} ${ZZ} eon_fft eon_fft2
bart fft -i $(bart bitmask ${DIM}) eon_fft2 eon
for i in `seq -w 0 $(($ZZ - 1))` ; do
bart slice ${DIM} $i eon sl
bart ecaltwo ${XX} ${YY} 1 sl sens-$i.coo
done
# # join slices back together
bart join ${DIM} sens-*.coo $output
} > $LOGFILE
exit 0
......@@ -60,11 +60,12 @@ int main_bart(int argc, char* argv[])
exit(1);
}
const char* tpath[3] = {
const char* tpath[] = {
#ifdef TOOLBOX_PATH_OVERRIDE
getenv("TOOLBOX_PATH"),
"/usr/lib/bart/commands/",
#endif
"/usr/local/lib/bart/commands/",
"/usr/lib/bart/commands/",
};
for (unsigned int i = 0; i < ARRAY_SIZE(tpath); i++) {
......
/* Copyright 2014. The Regents of the University of California.
* Copyright 2015-2017. Martin Uecker.
* Copyright 2015-2018. Martin Uecker.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2014-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de>
* 2014-2018 Martin Uecker <martin.uecker@med.uni-goettingen.de>
* 2014 Jonathan Tamir <jtamir@eecs.berkeley.edu>
*/
......@@ -19,6 +19,8 @@
#include "num/rand.h"
#include "num/init.h"
#include "num/ops.h"
#include "num/mdfft.h"
#include "num/fft.h"
#include "wavelet/wavthresh.h"
......@@ -414,6 +416,94 @@ static double bench_wavelet(long scale)
}
static double bench_generic_mdfft(long dims[DIMS], unsigned long flags)
{
complex float* x = md_alloc(DIMS, dims, CFL_SIZE);
complex float* y = md_alloc(DIMS, dims, CFL_SIZE);
md_gaussian_rand(DIMS, dims, x);
double tic = timestamp();
md_fft(DIMS, dims, flags, 0u, y, x);
double toc = timestamp();
md_free(x);
md_free(y);
return toc - tic;
}
static double bench_mdfft(long scale)
{
long dims[DIMS] = { 1, 128 * scale, 128 * scale, 1, 1, 4, 1, 4 };
return bench_generic_mdfft(dims, 6ul);
}
static double bench_generic_fft(long dims[DIMS], unsigned long flags)
{
complex float* x = md_alloc(DIMS, dims, CFL_SIZE);
complex float* y = md_alloc(DIMS, dims, CFL_SIZE);
md_gaussian_rand(DIMS, dims, x);
double tic = timestamp();
fft(DIMS, dims, flags, y, x);
double toc = timestamp();
md_free(x);
md_free(y);
return toc - tic;
}
static double bench_fft(long scale)
{
long dims[DIMS] = { 1, 256 * scale, 256 * scale, 1, 1, 16, 1, 8 };
return bench_generic_fft(dims, 6ul);
}
static double bench_generic_fftmod(long dims[DIMS], unsigned long flags)
{
complex float* x = md_alloc(DIMS, dims, CFL_SIZE);
complex float* y = md_alloc(DIMS, dims, CFL_SIZE);
md_gaussian_rand(DIMS, dims, x);
double tic = timestamp();
fftmod(DIMS, dims, flags, y, x);
double toc = timestamp();
md_free(x);
md_free(y);
return toc - tic;
}
static double bench_fftmod(long scale)
{
long dims[DIMS] = { 1, 256 * scale, 256 * scale, 1, 1, 16, 1, 16 };
return bench_generic_fftmod(dims, 6ul);
}
enum bench_indices { REPETITION_IND, SCALE_IND, THREADS_IND, TESTS_IND, BENCH_DIMS };
typedef double (*bench_fun)(long scale);
......@@ -472,6 +562,9 @@ const struct benchmark_s {
{ bench_copy1, "copy 1" },
{ bench_copy2, "copy 2" },
{ bench_wavelet, "wavelet soft thresh" },
{ bench_mdfft, "(MD-)FFT" },
{ bench_fft, "FFT" },
{ bench_fftmod, "fftmod" },
};
......
......@@ -11,6 +11,7 @@
#include <complex.h>
#include <stdio.h>
#include "num/init.h"
#include "num/flpmath.h"
#include "misc/mmio.h"
......@@ -28,6 +29,8 @@ int main_cabs(int argc, char* argv[])
{
mini_cmdline(&argc, argv, 2, usage_str, help_str);
num_init();
long dims[DIMS];
complex float* idata = load_cfl(argv[1], DIMS, dims);
......
......@@ -514,6 +514,7 @@ void calib2(const struct ecalib_conf* conf, const long out_dims[DIMS], complex f
if (conf->rotphase) {
// rotate the the phase with respect to the first principle component
long scc_dims[DIMS] = MD_INIT_ARRAY(DIMS, 1);
scc_dims[COIL_DIM] = channels;
scc_dims[MAPS_DIM] = channels;
......@@ -564,7 +565,6 @@ void calib2(const struct ecalib_conf* conf, const long out_dims[DIMS], complex f
debug_printf(DP_DEBUG1, "Fix phase...\n");
// rotate the the phase with respect to the first principle component
fixphase2(DIMS, out_dims, COIL_DIM, rot[0], out_data, out_data);
md_free(imgcov);
......