pehses / twixtools Goto Github PK
View Code? Open in Web Editor NEWpython file reader/writer for Siemens MRI raw data + compression utility
License: MIT License
python file reader/writer for Siemens MRI raw data + compression utility
License: MIT License
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)
multi_twix = twixtools.read_twix(original_file_path)
twixtools.write_twix(multi_twix, output_file_path)
Then try to reconstruct with Siemens' reconstruction
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
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?
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?
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
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)
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.
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
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
Hi all,
I think i've found a mistake in the calculation of the rotation matrix in:
twixtools/twixtools/geometry.py
Line 124 in 08cc6b7
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.
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:
Best Regards,
Zhengguo Tan
I believe that ismrmrd
has an option (when you read the acquisitions line by line) to also read the coordinate of the trajectory for each acquisition.
Is there a way to extract that same information using this tool?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.