diff --git a/oxasl_ve/api.py b/oxasl_ve/api.py index 97d64d0..d3036e6 100644 --- a/oxasl_ve/api.py +++ b/oxasl_ve/api.py @@ -241,7 +241,7 @@ def _decode(wsp): wsp.veasl.imlist = imlist else: # Auto-generate encoding definition from the initial vessel locations - wsp.veasl.enc_two = veslocs_to_enc(wsp.veslocs, wsp.asldata.ntc) + wsp.veasl.enc_two = veslocs_to_enc(wsp.veslocs, wsp.asldata.nenc) wsp.veasl.enc_mac, wsp.veasl.imlist = two_to_mac(wsp.veasl.enc_two) wsp.log.write("\n - Encoding matrix:\nTWO\n") @@ -306,7 +306,7 @@ def _model_vessels(wsp, num_vessels): for vessel in range(num_vessels): wsp.log.write("\n - Processing vessel %i\n" % (vessel+1)) wsp_ves = wsp.veasl.sub("vessel%i" % (vessel+1)) - vessel_data = np.zeros(list(wsp.asldata.shape[:3]) + [wsp.asldata.ntis,]) + vessel_data = np.zeros(list(wsp.asldata.shape[:3]) + [wsp.asldata.ntis,], dtype=np.float) for ti_idx in range(wsp.asldata.ntis): flow = getattr(wsp.veasl, "pld%i" % (ti_idx+1)).flow vessel_data[..., ti_idx] = flow.data[..., vessel] * 2 diff --git a/oxasl_ve/veaslc_cli_wrapper.py b/oxasl_ve/veaslc_cli_wrapper.py index 532d528..7657df2 100644 --- a/oxasl_ve/veaslc_cli_wrapper.py +++ b/oxasl_ve/veaslc_cli_wrapper.py @@ -6,6 +6,7 @@ def veaslc_wrapper(wsp, data, roi): """ # Run the C code ret = veaslc(data, roi, out=LOAD, + diff=data.iaf == "vediff", method=wsp.ifnone("veasl_method", "map"), veslocs=wsp.veslocs, imlist="T0123456", # FIXME diff --git a/oxasl_ve/wrappers/veaslc.py b/oxasl_ve/wrappers/veaslc.py index 1e4bd7a..b4fd927 100644 --- a/oxasl_ve/wrappers/veaslc.py +++ b/oxasl_ve/wrappers/veaslc.py @@ -21,6 +21,7 @@ def veaslc(data, roi, veslocs, encdef, imlist, modmat, out="veaslc", **kwargs): valmap = { 'inferv' : wutils.SHOW_IF_TRUE, 'debug' : wutils.SHOW_IF_TRUE, + 'diff' : wutils.SHOW_IF_TRUE, } asrt.assertIsNifti(data)