Skip to content

Commit

Permalink
Support pairwise subtracted VE data when used with a compliant VEASLC…
Browse files Browse the repository at this point in the history
… executable
  • Loading branch information
mcraig-ibme committed Aug 6, 2019
1 parent 7f6b61b commit 8feafea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oxasl_ve/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions oxasl_ve/veaslc_cli_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions oxasl_ve/wrappers/veaslc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8feafea

Please sign in to comment.