Skip to content

Commit

Permalink
fix readdir for MGE Bruker measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
tknopp committed May 24, 2024
1 parent 0d26b75 commit dee7b36
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MRIBase/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MRIBase"
uuid = "f7771a9a-6e57-4e71-863b-6e4b6a2f17df"
author = ["Tobias Knopp <tobias@knoppweb.de>"]
version = "0.4.2"
version = "0.4.3"

[deps]
AbstractNFFTs = "7f219486-4aa7-41d6-80a7-e08ef20ceed7"
Expand Down
3 changes: 3 additions & 0 deletions MRIBase/src/Datatypes/RawAcqData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ function rawdata(f::RawAcquisitionData; slice::Int=1, contrast::Int=1, repetitio
i1 = f.profiles[l].head.discard_pre + 1
i2 = i1+numSampPerProfile-1
kdata[:,cnt,:] .= f.profiles[l].data[i1:i2, :]
if f.profiles[l].head.read_dir[1] < 0
kdata[:,cnt,:] .= reverse(kdata[:,cnt,:], dims=1)
end
cnt += 1
end

Expand Down
2 changes: 1 addition & 1 deletion MRIFiles/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MRIFiles"
uuid = "5a6f062f-bf45-497d-b654-ad17aae2a530"
author = ["Tobias Knopp <tobias@knoppweb.de>"]
version = "0.3"
version = "0.3.1"

[deps]
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Expand Down
2 changes: 1 addition & 1 deletion MRIFiles/src/Bruker/Bruker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function RawAcquisitionDataFid(b::BrukerFile)
position = (pos[1], pos[2], pos[3])

head = AcquisitionHeader(number_of_samples=N[1], idx=counter,
read_dir=read_dir, phase_dir=phase_dir,
read_dir=read_dir.*(-1)^(nEcho-1), phase_dir=phase_dir,
slice_dir=slice_dir, position=position,
center_sample=div(N[1],2),
available_channels = numAvailableChannel, #TODO
Expand Down

7 comments on commit dee7b36

@tknopp
Copy link
Member Author

@tknopp tknopp commented on dee7b36 May 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=MRIBase

@tknopp
Copy link
Member Author

@tknopp tknopp commented on dee7b36 May 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=MRIFiles

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107539

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a MRIBase-v0.4.3 -m "<description of version>" dee7b36f74de86b5220d25e1afc2ed897e2368c5
git push origin MRIBase-v0.4.3

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107540

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a MRIFiles-v0.3.1 -m "<description of version>" dee7b36f74de86b5220d25e1afc2ed897e2368c5
git push origin MRIFiles-v0.3.1

@aTrotier
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is possible for MGE to enable the positive readout only option, no ? (for PV360 ->EchoAcqMode)

@tknopp
Copy link
Member Author

@tknopp tknopp commented on dee7b36 May 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you see a more proper fix, please go ahead and clean this up. We yesterday made some measurements and I needed a hot fix.

@aTrotier
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be applied on every multi-echo acquisition (MESE for example).
I don't know how to manage that without adding a if else that check if the sequence is an MGE...

Please sign in to comment.