Git Product home page Git Product logo

twixtools's People

Contributors

aghaeifar avatar cth7 avatar martink84 avatar osburg avatar pehses avatar schaten avatar zhengguotan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twixtools's Issues

Loading and saving dat file causes Siemens' reconstruction to fail

Hi,

I have encountered the following issue: whenever a .dat file is opened, saved to a different file and then reconstructed with Siemens' software, the reconstruct fails (find error message below)

Steps to reproduce:

multi_twix = twixtools.read_twix(original_file_path)
twixtools.write_twix(multi_twix, output_file_path)

Then try to reconstruct with Siemens' reconstruction

Error message (or what I think is the relevant bit):

      13        2021/06/16-15:55:21.814239      Error   DLL     1756    ReadoutChecker  readoutchecker_safety.cpp:187   IReadoutCheckerImpl::CheckScanId        invalid scan Id in scan header
                                                                                                                                  scan 1
                                                                                                                                 : expected scan Id 1
                                                                                                                                  received scan Id 2
      13        2021/06/16-15:55:21.814239      Error   DLL     1756    ReadoutChecker  readoutchecker_safety.cpp:374   IReadoutCheckerImpl::Decompose  mdh check failed

Parsing other groups and storing in dictionary

Hi. Recently found your repository and am interested in using it to load Siemens MRI raw data. Are there any plans to parse the other groups (e.g. 'Dicom') using parse_ascconv? Currently only 'MeasYaps' is parsed and stored as a dictionary. It would be useful if the other groups could be parsed and values stored in dictionaries too.

I tried adding the names of the other groups here as such

if name in ['Config', 'Dicom', 'Meas', 'MeasYaps', 'Phoenix', 'Spice']:

but I encounter an error. Was wondering if the others could be parsed in similar fashion or if different logic is required?

Averaging over Idx

Hi,

By default, application of the averaging flag is applied to the Idx dimensions (Ida to Ide). These dimensions are commonly utilized in the sequence for free looping (such as tfl_b1 mapping). Would it be more practical to exclude these dimensions when the averaging flag is activated? Alternatively, should additional flags, like 'average_Idx,' be introduced specifically for them?

License?

Is there an intention for the authors to add a license to this repo? It would be nice to know if the intention is for this code to be Open Sourced or not

Small indent error

Hey,

First of all thanks for making this tool available - this will save me a lot of time at the scanner and at postprocessing.

I believe in twixzip.py , line 705 there is an indent error
parser.add_argument("--profile", action="store_true")

(Otherwise args.profile is not defined in the --decompress mode and it crashes at line 709)

bandwidth

Dear twixtools developers,

Thank you for providing such an excellent tool.

I wonder how one can extract the bandwidth (Hz/Px) from the raw dat file?

Thank you in advance for any of your advices.

Cacq flag not read

Hi Philipp,

if I am not mistaken, the tool does not handle the a dimensions set with the flag m_sADC01.getMDH().setCacq(); -- in my dataset, this dimension is missing / of size 1, while the reading works fine in your mapVBVD Matlab tool. Not sure how to create a MWE, but I could send you a phantom dataset if that helps. Unfortunately, they are rather large... They code I call is

>>> multi_twix = twixtools.read_twix(filename)
>>> mapped = twixtools.map_twix(multi_twix)
>>> im_data = mapped[-1]['image']
>>> im_data.shape
(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1142, 52, 320)

and I get the same size for the actual data:

>>> data = im_data[:]
>>> data.shape
(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1142, 52, 320)

With the call

>>> im_data.base_size
(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 90, 1142, 52, 320)

I get the right dimensions. Yet, I don't know how get the data along the 90 dimension...

-ja

Does not seem to work with recent .dat files from Prisma scanner running VE11E

First of all thank you for creating this tool!

When I try to read recent raw data files from a Prisma scanner running VE11E the read_twix function returns an empty list of scans. I can share the raw data file(s) which create this problems. It occurs with raw data from simple localizer scan and from other sequences too. Any ideas how to deal with this problem?

Thank you!

Best regards,

Michael

Error when calculating rotation matrix

Hi all,
I think i've found a mistake in the calculation of the rotation matrix in:

mat = (np.eye(3) + V + V * V * (1 - c) / s ** 2) @ mat

The mathematical operation V * V gives a matrix with squared entries, while what we actually need there is a matrix multiplication (i.e. np.matmul(V, V). The resulting rotation matrix otherwise is errorous and not orthonormal.

map_twix: index 1182720 is out of bounds for axis 0 with size 1182720

Dear twixtools developers,

Thank you first of all for providing such an excellent tool! I enjoy it very much and use it.

Recently I try to use the map_twix function to map a .dat file with the shape:

(1, 1, 1, 1, 1, 2, 1, 32, 1, 1, 1, 84, 1, 220, 32, 220)

However, an error occurs in https://github.com/pehses/twixtools/blob/master/twixtools/map_twix.py#L645

which throws an IndexError:

index 1182720 is out of bounds for axis 0 with size 1182720.

My questions may be:

  1. Is such data too large for map_twix? Or does the data itself contains some error?
  2. Is there some way to debug such as to understand why this error occurs?

Best Regards,
Zhengguo Tan

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.