Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add save kdata to ismrmrd file #421

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Add save kdata to ismrmrd file #421

wants to merge 30 commits into from

Conversation

ckolbPTB
Copy link
Collaborator

@ckolbPTB ckolbPTB commented Sep 28, 2024

Save the KData object as mrd raw data file including all the header parameters supported by MRpro and the trajectory.

Copy link
Contributor

github-actions bot commented Sep 28, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/mrpro/algorithms/csm
   inati.py24196%44
   walsh.py16194%53
src/mrpro/algorithms/dcf
   dcf_voronoi.py53492%15, 55–56, 89
src/mrpro/algorithms/optimizers
   adam.py20195%101
   pdhg.py79396%177–178, 184
src/mrpro/algorithms/reconstruction
   DirectReconstruction.py281643%59–79, 93
   IterativeSENSEReconstruction.py13192%79
   Reconstruction.py502256%42, 54–56, 80–87, 108–117
   RegularizedIterativeSENSEReconstruction.py411759%97–101, 115–140
src/mrpro/data
   AcqInfo.py161398%27, 170, 208
   CsmData.py29390%15, 84–86
   DcfData.py45882%18, 66, 78–83
   IData.py67987%120, 126, 130, 160–168
   IHeader.py75791%75, 109, 127–131
   KData.py2352589%111–112, 127, 134, 144, 152, 206–207, 245, 250–251, 311–322, 481, 483, 548, 563, 600, 631, 640
   KHeader.py2061493%25, 119–123, 150, 210, 217–218, 351–362
   KNoise.py311552%39–52, 56–61
   KTrajectory.py811285%112–117, 120–122, 207–211
   MoveDataMixin.py1401887%28, 126, 142, 156–158, 220, 336–338, 351, 430, 450–451, 453, 468–469, 471
   QData.py39782%42, 65–73
   Rotation.py6743595%100, 198, 335, 433, 477, 495, 582, 584, 593, 627, 629, 692, 769, 774, 777, 792, 809, 814, 890, 1078, 1083, 1086, 1110, 1114, 1242, 1244, 1252–1253, 1317, 1399, 1692, 1844, 1879, 1883, 1994
   SpatialDimension.py2322191%34, 104, 142, 149, 155, 275–277, 290–292, 326, 344, 357, 370, 383, 396, 405–406, 421, 430
   acq_filters.py12192%47
src/mrpro/data/traj_calculators
   KTrajectoryCalculator.py25292%23, 45
   KTrajectoryIsmrmrd.py13192%41
   KTrajectoryPulseq.py23196%55
src/mrpro/operators
   CartesianSamplingOp.py89397%118, 157, 280
   ConstraintsOp.py60297%46, 48
   EndomorphOperator.py65297%228, 234
   FiniteDifferenceOp.py27293%40, 105
   FourierOp.py158398%274, 392, 397
   Functional.py71593%20–22, 117, 119
   GridSamplingOp.py136993%72–73, 82–83, 90–91, 94, 96, 98
   LinearOperator.py168995%55, 114, 224, 254, 295, 304, 312, 329, 364
   LinearOperatorMatrix.py1581690%82, 119, 152, 161, 166, 175–178, 191–194, 203, 215, 304, 331, 359
   MultiIdentityOp.py13285%43, 48
   Operator.py78297%31, 87
   ProximableFunctionalSeparableSum.py39392%50, 103, 110
   SliceProjectionOp.py173895%44, 61, 63, 69, 207, 228, 261, 301
   WaveletOp.py119596%151, 169, 204, 209, 232
   ZeroPadOp.py16194%30
src/mrpro/utils
   filters.py62297%44, 49
   reshape.py60198%191
   slice_profiles.py46687%20, 36, 113–116, 149
   sliding_window.py34197%34
   split_idx.py10280%43, 47
   summarize_tensorvalues.py11918%20–29
   typing.py211148%8–23
   zero_pad_or_crop.py31681%26, 30, 55, 58, 61, 64
TOTAL508835893% 

Tests Skipped Failures Errors Time
2302 0 💤 0 ❌ 0 🔥 1m 10s ⏱️

src/mrpro/data/AcqInfo.py Outdated Show resolved Hide resolved
src/mrpro/data/AcqInfo.py Outdated Show resolved Hide resolved
src/mrpro/data/KHeader.py Outdated Show resolved Hide resolved
src/mrpro/data/KHeader.py Outdated Show resolved Hide resolved
src/mrpro/data/KHeader.py Outdated Show resolved Hide resolved
src/mrpro/data/KHeader.py Outdated Show resolved Hide resolved
src/mrpro/data/KHeader.py Outdated Show resolved Hide resolved
src/mrpro/data/AcqInfo.py Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Oct 2, 2024

📚 Documentation

📁 Download as zip
🔍 View online

src/mrpro/data/AcqInfo.py Outdated Show resolved Hide resolved
@ckolbPTB
Copy link
Collaborator Author

pre-commit.ci autofix

@ckolbPTB ckolbPTB marked this pull request as ready for review November 14, 2024 16:35
@fzimmermann89
Copy link
Member

I think there was a bug:
self.patient_table_position[*idx][0].apply_(m_to_mm)

getitem returns a view.
apply_ changes that view in place.

#547

@fzimmermann89
Copy link
Member

Fixed the idx and simplified a tiny bit.

this now should pass mypy and work in py310

@ckolbPTB
Copy link
Collaborator Author

I think there was a bug:

Good catch! thanks!

@fzimmermann89 fzimmermann89 added the pre-commit.ci autofix run autofix in this PR label Nov 22, 2024
@pre-commit-ci pre-commit-ci bot removed the pre-commit.ci autofix run autofix in this PR label Nov 22, 2024
@ckolbPTB ckolbPTB mentioned this pull request Dec 10, 2024
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

2 participants