Addition of Motion to a Particular Class of Spins in a Phantom #717
-
|
Hi, I'm trying to add some translational motion in some particular spins of my phantom. In the current implementation, I need to provide a range of spins in the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi! there's a way to give a mask instead of a range, an example is shown here: https://juliahealth.org/KomaMRI.jl/dev/reference/2-koma-base/#KomaMRIBase.SpinRange, @pvillacorta could confirm. Nevertheless, I wouldn't recommend you to do that! As the use of a mask instead of a range makes the simulation very inefficient. What I can recommend is to create a phantom with all the tissues you want to be static |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Yes, in fact, the current implementation would only allow defining motion for spins which are adjacent in id number, that is, they belong to the same range. It would throw an error if that was not the case, precisely, for performance reasons. The most appropriate way to do this is actually what @cncastillo mentioned. For your specific case: obj1 = obj[obj.T2 .== 80e-3]
obj2 = obj[obj.T2 .!= 80e-3]
obj1.motion = translate(0.01, 0.0, 0.0, TimeRange(0.0, 1.0)) # for example
obj_sum = obj1 + obj2 |
Beta Was this translation helpful? Give feedback.
Hi! there's a way to give a mask instead of a range, an example is shown here: https://juliahealth.org/KomaMRI.jl/dev/reference/2-koma-base/#KomaMRIBase.SpinRange, @pvillacorta could confirm.
Nevertheless, I wouldn't recommend you to do that! As the use of a mask instead of a range makes the simulation very inefficient.
What I can recommend is to create a phantom with all the tissues you want to be static
obj_static, and another that is dynamic with spin rangeAllSpins()calledobj_dynamic. You can combine both withobj = obj_static + obj_dynamic. This new object will be efficient, and contain motion for only one tissue.