Code Monkey home page Code Monkey logo

Comments (12)

gdevenyi avatar gdevenyi commented on June 3, 2024 1

This is Paravision 5.1, and we have adjusted the reconstruction at least to remove the percentile clipping because it was messing up the full intensity range of the EPI. I wouldn't consider the value "inconsistent" its just every single timeslice is rescaled to maximize the data range. I think the converter should probable handle this properly.

from brkraw.

Gab-D-G avatar Gab-D-G commented on June 3, 2024 1

The conversion is working perfectly now. Thanks a lot for addressing this!

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 3, 2024

@Gab-D-G Thank you for sharing the data, I will check and let you know what could be an issue.

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 3, 2024

@Gab-D-G This seems unusual error I've never had. The reason is you have an inconsistent rescale value for each volume. Is it the version beyond Paravision 6.01 or do you have a particular setup on datatype? (default reconstruction option?)

from brkraw.

gdevenyi avatar gdevenyi commented on June 3, 2024

I wonder if --ignore-rescale would allow this to convert in the meantime.

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 3, 2024

@gdevenyi Yes, I think I can handle this. Thank you for your comment. If this is data for fMRI, the scale needs to be properly applied because rescaling each frame differently changes the timecourse.

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 3, 2024

@Gab-D-G Until I'm making an update, if you need urgent conversion, please use python API as below.

import brkraw as br
raw = br.load('<data folder name>')
raw.get_niftiobj(4, 1, slope=True).to_filename('<output_filename>')

This will convert data after rescale using slope value.

from brkraw.

Gab-D-G avatar Gab-D-G commented on June 3, 2024

Great, thanks a lot!

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 3, 2024

@Gab-D-G Sorry for delaying on this! The issue has resolved from v0.3.4.
Please let me know if you have any issues regarding this update.

from brkraw.

Gab-D-G avatar Gab-D-G commented on June 3, 2024

As a follow-up to this, I tried the conversion to BIDS format on the same dataset (in raw/20190807_MCH_MFC_058.UE1) and ran into the following error

(bruker_converter) gabriel@gabriel-XPS-13-7390:~/Work/dev/brkraw$ brkraw bids_convert raw/ bids_info.xlsx -j bids_info.json -o bids_out/
Inspect input BIDS datasheet...
Converting 20190807_MCH_MFC_058.UE1...
NoneType: None
Traceback (most recent call last):
  File "/home/gabriel/miniconda3/envs/bruker_converter/bin/brkraw", line 8, in <module>
    sys.exit(main())
  File "/home/gabriel/miniconda3/envs/bruker_converter/lib/python3.7/site-packages/brkraw/scripts/brkraw.py", line 489, in main
    build_bids_json(dset, sub_row, fname, json_fname, slope=slope, offset=offset)
  File "/home/gabriel/miniconda3/envs/bruker_converter/lib/python3.7/site-packages/brkraw/lib/utils.py", line 580, in build_bids_json
    metadata=ref, condition=condition)
  File "/home/gabriel/miniconda3/envs/bruker_converter/lib/python3.7/site-packages/brkraw/lib/loader.py", line 509, in save_json
    json_obj = self._parse_json(scan_id, reco_id, metadata)
  File "/home/gabriel/miniconda3/envs/bruker_converter/lib/python3.7/site-packages/brkraw/lib/loader.py", line 490, in _parse_json
    raise UnexpectedError('Unexpected phase encoding direction in PV5.1.')
shleeh.errors.UnexpectedError: Unexpected phase encoding direction in PV5.1.

The .xlsx and .json files were obtained by running

(bruker_converter) gabriel@gabriel-XPS-13-7390:~/Work/dev/brkraw$ brkraw bids_helper raw bids_info -j

It seems to ignore the error when I run the conversion using tonii_all -b option, but this option doesn't take care of the file naming

(bruker_converter) gabriel@gabriel-XPS-13-7390:~/Work/dev/brkraw$ brkraw tonii_all raw -o out -b
NoneType: None
Unexpected phase encoding direction in PV5.1.
NoneType: None
Unexpected phase encoding direction in PV5.1.
20190807_MCH_MFC_058.UE1 is converted...

Can I get support on this issue?

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 3, 2024

@Gab-D-G I will check the issue! Thank you for the report!

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 3, 2024

@Gab-D-G Sorry about late to solve this issue. The issue occurs during metadata parsing for JSON, and multiple phase encoding directions caused this. I just remove the exception on the code and updated it to parsing the values for each slice packages. So the error will not show up for future versions.

Currently, due to the paper review, I'm planning to update solutions for the all current issue on the one release version, until I released the patch version, would you mind to install the package through GitHub repo?

If you have any other issues regarding this update, please let me know!

from brkraw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.