JuliaImageRecon / ImagePhantoms.jl

Software phantoms for image reconstruction
MIT License
11 stars 4 forks source link

Cone Phantom #57

Closed tknopp closed 2 years ago

tknopp commented 2 years ago

Within magnetic particle imaging we are using cone phantoms:

image

Here is some hacked code that generates a synthetic cone

function makeConePhantom(N, Ry=N[2]÷4, Rz=N[3]÷3, L=N[1]÷2)
    I = zeros(Float32, N...)
    for x=(N[1]÷2-L÷2):(N[1]÷2+L÷2-1)  
       h = (L-x+N[1]÷2-L÷2)/L
       I[x, :, :] = [sqrt((y-N[2]÷2)^2/Ry^2 + (z-N[3]÷2)^2/Rz^2) <= h for y=1:N[2], z=1:N[3]]
    end
    return I
  end

Would something like this fit into ImagePhantoms.jl? Of course a proper version derived from triangle.

JeffFessler commented 2 years ago

A right circular cone is easy and I'd be glad to add that myself so that you can focus on the harder work at MRIReco.jl, unless you want to make the PR yourself.

An oblique cone would be harder because we'd need another parameter in its Shape type to describe how oblique. I started to work on obliqueness for a [triangle(https://github.com/JuliaImageRecon/ImagePhantoms.jl/blob/74aba2a25b6e3205a85f61e4510af4bc4e2690f2/src/triangle.jl#L23) but abandoned it. Ideally we'd have methods for the Radon transform and spectrum of the cone, but I don't know those functions. (Do you?) It's ok for now to have throwing placeholder methods that could be filled in later if someone needs them.

tknopp commented 2 years ago

Ideally we'd have methods for the Radon transform and spectrum of the cone, but I don't know those functions. (Do you?) It's ok for now to have throwing placeholder methods that could be filled in later if someone needs them.

No, I don't have analytical methods for the Radon transform and spectrum. But while it is great to have these for certain shapes I would also say that this should not be a show stopper for the introduction of other shapes.

JeffFessler commented 2 years ago

Is a right circular cone sufficient for you? (Actually it doesn't have to be circular - we'll get ellipses for free, but is right sufficient?)

tknopp commented 2 years ago

yes for my application a right circular cone is sufficient. I would think we don't need to make the shape collection exhaustive but rather collect common shapes used in tomography applications so far.

JeffFessler commented 2 years ago

Closed by #62