-
Notifications
You must be signed in to change notification settings - Fork 235
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
Wrong intensity when RandomMotion is applied after ZNormalization #37
Comments
Actually this is expected because of this line: https://github.com/fepegar/torchio/blob/master/torchio/transforms/random_motion.py#L216. I'm not sure it's the best approach. |
Hi You could change this line L216 to take the real part, but it is not the way the acquisition works ... I just check to perform random motion with the same seed, and compare the 2 cases (real and abs value after inv fft) this induce changes especially in the background we you get negative value if you take the real part So I do not thing it is a good idea to change abs to real ... (since this is not what you will get from the scanner after motion ... (the scanner is always returning the abs)) May be you just need to invert the order of the transforms ... (starting with random motion ... ?) |
Not realated, but I look closer to the znormalization and I do not understand the rational to compute the mean on the mask build for pixel above the mean ... |
I agree. What about emitting a warning if there are negative values in the
input?
…On Fri, 10 Jan 2020, 08:36 valabregue, ***@***.***> wrote:
Hi
Ok I see, MRI is a complex number but we always take the abs value.
I am not sure why this is so, but with normal acquisition we do not have
negative number. So here after the ZNormalization you end up with negative
number which are turn to positive after the abs operation donne after the
inverse fft
You could change this line L216 to take the real part, but it is not the
way the acquisition works ...
I just check to perform random motion with the same seed, and compare the
2 cases (real and abs value after inv fft) this induce changes especially
in the background we you get negative value if you take the real part
So I do not thing it is a good idea to change abs to real ... (since this
is not what you will get from the scanner after motion ... (the scanner is
always returning the abs))
May be you just need to invert the order of the transforms ... (starting
with random motion ... ?)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#37?email_source=notifications&email_token=ADAZVVCRNXUKBJ43T5TXUXTQ5AXQ3A5CNFSM4KE2SFCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEITDN7Y#issuecomment-572929791>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAZVVB5Q5VIG5URTSNCKWTQ5AXQ3ANCNFSM4KE2SFCA>
.
|
yes good idea, since it can easily happen as you find out ... add a warning, something like that : |
To reproduce:
@romainVala do you know why this could be? I'm probably missing some theory about the Fourier transform.
The text was updated successfully, but these errors were encountered: