Hi, For iterative reconstruction, it's almost the opposite: since we use a ray-based projector, the volume needs to be 3D (and cannot be purely 2D) but the projections can be 1D. For the backprojection, you then need to have the adjoint of the projector, a voxel projector would not work. Enclosed is an example with conjugate gradient on your data but any iterative algorithm in RTK will work if you respect these projectors. Not all of them are wrapped in Python but you can write the geometry file and call them from the command line. I have added the example with simulations to the wiki: http://wiki.openrtk.org/index.php/FanBeam Simon
On Thu, May 18, 2017 at 10:20 AM, Jacob Frøsig <j...@force.dk> wrote: > Hi, > > Thank you for the input and reference! > > You previously mentioned that there was a method to use the iterative > reconstructions for fanbeam measurements. What is exactly needed? And is it > similar for the ADMM wavelet reconstruction? > > > > Best regards, > > > > Jacob > > *From:* simon....@gmail.com [mailto:simon....@gmail.com] *On Behalf Of *Simon > Rit > *Sent:* 17. maj 2017 16:42 > > *To:* Jacob Frøsig <j...@force.dk> > *Cc:* rtk-us...@openrtk.org > *Subject:* Re: [Rtk-users] Reconstructing from fan-beam projections > > > > I guess the extreme negative values are due to truncation. I have never > worked on the interior problem before so I don't have experience with this > but I'm not surprised that you reconstruct bad values. > The implemented correction is > Ohnesorge, B.; Flohr, T.; Schwarz, K.; Heiken, J. & Bae, K. > Efficient correction for CT image artifacts caused by objects extending > outside the scan field of view > *Med Phys, **2000**, 27*, 39-46 > > The parameter is the ratio of extension (between 0 and 1). > > Simon > > > > On Wed, May 17, 2017 at 3:41 PM, Jacob Frøsig <j...@force.dk> wrote: > > Hi, > > > > Thank you, it is a great help! Attached is a report describing the project > where the beginning of chapter 5 describes the data acquisition. > The investigated object is an oil pipe. Yes, the reconstruction contains > the expected interior part of the oil pipe along with the ring artefact > > which is characteristic for the interior problem. > What puzzles me is that I get a few extreme negative values, -1.5884e+38 > , in the bottom of the reconstruction using FDKConeBeamReconstructionFilte > r. I have attached the truncated reconstruction without negative values > and the reconstruction with negative values. What exactly is your > truncation correction? > > Have you seen something similar before? > > > > Best regards, > > > > Jacob > > > > *From:* simon....@gmail.com [mailto:simon....@gmail.com] *On Behalf Of *Simon > Rit > *Sent:* 17. maj 2017 15:03 > > > *To:* Jacob Frøsig <j...@force.dk> > *Cc:* rtk-us...@openrtk.org > *Subject:* Re: [Rtk-users] Reconstructing from fan-beam projections > > > > Hi, > > Here is what I obtain. I have no clue what you expect but that's how I > would translate the geometric information that you provided. The interior > problem is obviously an issue here (our truncation correction does not help > for interior CT) but maybe you can tell us if you recognize your object. > There are clear ring artefacts as well in your sinogram. > > I hope this helps, > > Simon > > > > On Tue, May 16, 2017 at 7:22 PM, Jacob Frøsig <j...@force.dk> wrote: > > Hi, > > > > yes, it is indeed an interior- / region of interest problem in the sense > that we only are interested in the fully illuminated centre region. > I have previously had success in getting good reconstructions from > interior data using variational formulation with tailored penalty term. > However, this is implemented in Matlab and the aim is to use your > implementation to get a C++ implementation of this method. > > But for now, I am just figuring how to do a simple reconstruction to get a > grasp on the library. > > > > Best regards, > > > > Jacob > > > > > ------------------------------ > > *Fra:* simon....@gmail.com <simon....@gmail.com> på vegne af Simon Rit < > simon....@creatis.insa-lyon.fr> > *Sendt:* 16. maj 2017 16:59:12 > *Til:* Jacob Frøsig > *Cc:* rtk-us...@openrtk.org > *Emne:* Re: [Rtk-users] Reconstructing from fan-beam projections > > > > Hi, > > If this is true, then the sinogram indicates that you are dealing with an > interior problem since you have high line integrals at the border (see > enclosed profile). Is that indeed the case? If yes, that's a difficult > problem... > > Simon > > > > On Tue, May 16, 2017 at 3:16 PM, Jacob Frøsig <j...@force.dk> wrote: > > Hi, > > > > The attached sinogram consist of line integral values, i.e., sinogram(i,j) > = -ln[ *I(i,j)/I_0(i)* ] where *I *and ***I_0 *are the measured > intensities with and without an object, respectively. > Since we are measuring with a line detector, the “zero” (*I_0*) is in > this case just an array. > > *j* is the index for the projections, i.e., *j* ∈ {1,2,…,360} since we > take one projection for each whole angle. > > I hope this explains the sinogram and again; thank you for your time! > > Best regards, > > Jacob > > > > *From:* simon....@gmail.com [mailto:simon....@gmail.com] *On Behalf Of *Simon > Rit > *Sent:* 16. maj 2017 14:54 > *To:* Jacob Frøsig <j...@force.dk> > *Cc:* rtk-us...@openrtk.org > > > *Subject:* Re: [Rtk-users] Reconstructing from fan-beam projections > > > > Hi Jacob, > > Thanks for the image of the sinogram. I don't understand this sinogram. Do > you know how to convert each pixel value to a line integral? I.e., if it's > x-ray imaging, do you have an image without object? > > Thanks, > > Simon > > > > On Tue, May 16, 2017 at 2:24 PM, Jacob Frøsig <j...@force.dk> wrote: > > Hi again, > > and thank you for the example! > > I have some trouble getting a proper reconstruction. If you have the time, > any help would be appreciated. > > Attached is my fan-beam sinogram as a .tif file. Here, projections are > taken for 360 degrees and the detector has 507 pixels. > I believe the issue lies in setting the geometry and maybe the spacing > between the pixels. The measurement geometry is as follows > > Source to centre: 590 mm > > Source to detector: 1000 mm > > Detector length: 411mm > > > > Best regards, > > > > Jacob > > > > > > *From:* Rtk-users [mailto:rtk-users-boun...@public.kitware.com] *On > Behalf Of *Simon Rit > *Sent:* 15. maj 2017 17:32 > *To:* rtk-us...@openrtk.org > > > *Subject:* Re: [Rtk-users] Reconstructing from fan-beam projections > > > > Hi, > > I have added an example here: > http://wiki.openrtk.org/index.php/FanBeam > > The values in the first and the third rows are not used, as illustrated in > this example. We add them to do a 2D interpolation but we do this 2D > interpolation exactly on the second row so that's not a problem. > > Note that it's a bit more tricky for iterative recon but we also have a > solution for this if you need it. > > Best regards, > > Simon > > > > On Mon, May 15, 2017 at 4:31 PM, Jacob Frøsig <j...@force.dk> wrote: > > Hi again, > > > > Thank you for the quick answer! An example would be great, thanks. I have > one concern about copying the fan-beam data: > > > Then we would have 2D projections for which each column is the same > fan-beam projection. By this, values of the same row are equal even though > the cone-beam geometry indicates the outer columns correspond to > intensities of rays with longer travel time through the object and hence > should have attenuated more. Is this neglectable? > > > > Again, thanks! > > > > Best regards, > > Jacob > > > > > > > > *From:* simon....@gmail.com [mailto:simon....@gmail.com] *On Behalf Of *Simon > Rit > *Sent:* 15. maj 2017 16:05 > *To:* louie L <ghos...@hotmail.com> > *Cc:* Jacob Frøsig <j...@force.dk>; rtk-users@public.kitware.com > *Subject:* Re: [Rtk-users] Reconstructing from fan-beam projections > > > > Hi, > > I agree. What I do is do a 3 slice sinogram from the fan-beam projections > by copying the same data in each slice but reconstruct one 2D slice. If you > need an example, I can quickly demonstrate this in a short Python script. > > Simon > > > > On Mon, May 15, 2017 at 4:01 PM, louie L <ghos...@hotmail.com> wrote: > > Hi, > > > > I think you can carefully pad zeros to your projections. Reconstruct as if > it is a 3d object. Take the middle slice as your fanbeam result. > > Let me know if it helps. > > > > Best regards, > > Louie > > Sent from my iOS > > > Am 15.05.2017 um 15:55 schrieb Jacob Frøsig <j...@force.dk>: > > Dear Rtk-users > > > > I was wandering if Rtk includes an implementation of a reconstruction > method to reconstruct a 2D representation of an object given fan-beam > projections. > > Or, if anyone has experience using e.g. FDKConeBeamReconstructionFilter > on projections from line-detectors (fan-beam instead of cone-beam). > > > > I hope you guys can help. > > Yours sincerely > > *Jacob Frøsig * > > Project Manager > Sensor Innovation > > FORCE Technology > Park Allé 345 > 2605 Brøndby > Denmark > > Phone: +45 43 25 00 00 <+45%2043%2025%2000%2000> > Direct: +45 43 25 16 43 <+45%2043%2025%2016%2043> > Skype for Business: j...@forcetechnology.com > Fax: +45 43 25 00 10 <+45%2043%2025%2000%2010> > e-mail: j...@force.dk > www: forcetechnology.com > <https://forcetechnology.com?utm_source=mail-signature&utm_medium=email&utm_campaign=EmployeeBranding> > > ************************************************************************* > This email and any files transmitted with it may contain confidential > information intended for the addressee(s) only. The information is not to > be > surrendered or copied to unauthorised persons. If you have received > this communication in error, please notify us immediately by email at: > i...@forcetechnology.com > ************************************************************************* > > _______________________________________________ > Rtk-users mailing list > Rtk-users@public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users@public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > >
#!/usr/bin/env python import SimpleRTK as srtk import numpy as np import sys # Create a geometry g = srtk.ThreeDCircularProjectionGeometry() for i in range(360): g.AddProjection(590.,1000.,i) reader = srtk.ImageFileReader() reader.SetFileName('sinogram.tif') proj = reader.Execute() # The projection can be 1D projarray = srtk.GetArrayFromImage(proj) projarray = projarray.reshape([projarray.shape[0],1,projarray.shape[1]]) proj2D = srtk.GetImageFromArray(projarray) proj2D.SetSpacing([411./projarray.shape[2]]*3) proj2D.SetOrigin((np.array(proj2D.GetSize())-1)*np.array(proj2D.GetSpacing())*-0.5) writer = srtk.ImageFileWriter() writer.SetFileName('conebeam.mha') writer.Execute(proj2D) # The ray-based (back-)projector needs a 3D image even if only the central slice (in front of the 1D projection) is used recon = srtk.ConstantImageSource() recon.SetSize([512,3,512]) recon.SetSpacing([0.5]*3) recon.SetOrigin((np.array(recon.GetSize())-1)*np.array(recon.GetSpacing())*-0.5) recon.SetConstant(0) recon = recon.Execute() mask = proj2D*0.+1. cg = srtk.ConjugateGradientConeBeamReconstructionFilter() cg.SetGeometry(g) cg.SetForwardProjectionFilter(0) cg.SetBackProjectionFilter(1) cg.SetNumberOfIterations(50) recon = cg.Execute(recon,proj2D,mask) writer.SetFileName('cg.mha') writer.Execute(recon)
_______________________________________________ Rtk-users mailing list Rtk-users@public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users