Skip to content

Commit

Permalink
[add feature] Issue #8- bdata generation
Browse files Browse the repository at this point in the history
dvm-shlee committed Jun 2, 2020
1 parent 0a9295b commit d37c7ab
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion brkraw/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .lib import *

__version__ = '0.3.3rc7'
__version__ = '0.3.3rc8'
__all__ = ['BrukerLoader', '__version__']


3 changes: 3 additions & 0 deletions brkraw/scripts/brkraw.py
Original file line number Diff line number Diff line change
@@ -125,7 +125,10 @@ def main():
try:
scan_id = int(scan_id)
reco_id = int(reco_id)
method = study._pvobj._method[scan_id].parameters['Method']
study.save_as(scan_id, reco_id, output_fname, slope=slope)
if re.search('dti', method, re.IGNORECASE):
study.save_bdata(scan_id, output_fname)
if args.bids:
study.save_json(scan_id, reco_id, output_fname)
print('NifTi file is generated... [{}]'.format(output_fname))
4 changes: 4 additions & 0 deletions brkraw/ui/main_win.py
Original file line number Diff line number Diff line change
@@ -188,6 +188,10 @@ def _save_as(self):
else:
slope = False
self._raw.save_as(self._scan_id, self._reco_id, filename, dir=self._output, slope=slope)
method = self._raw._pvobj._method[self._scan_id].parameters['Method']
import re
if re.search('dti', method, re.IGNORECASE):
self._raw.save_bdata(self._scan_id, filename)
from tkinter import messagebox
messagebox.showinfo(title='File conversion',
message='{}/{}.nii.gz has been converted'.format(self._output,

0 comments on commit d37c7ab

Please sign in to comment.