<div dir="ltr"><div>Hi,</div><div>rtkfdk is a full pipeline which also allows to do short scans (<a href="https://doi.org/10.1118/1.595078">https://doi.org/10.1118/1.595078</a>) or displaced detector (<a href="https://doi.org/10.1118/1.1489043">https://doi.org/10.1118/1.1489043</a>).</div><div>The first yellow mark disables or enables the displaced detector filter depending on a parameter on the command line.</div><div>The second yellow park sets how large should the gap be to be a short scan (in the Parker algorithm).</div><div>The last mark uses streaming to compute the final image by parts. <span style="font-family:"Courier New",monospace;background-color:rgb(255,255,0)">args_info.divisions_arg</span><span style="font-family:"Courier New",monospace"> </span>is the number of parts.</div><div>If you have a regular full revolution with a centered detector and a computer with enough RAM, you won't need any of this, no.</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 28, 2021 at 11:18 AM Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com">yao_hao777@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Simon</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks for the clarification. In the rtkfdk.cxx file, there are these following lines:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">using DDFCPUType = rtk::DisplacedDetectorImageFilter<OutputImageType>;<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">...<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">ddf->SetDisable(</span><span style="font-family:"Courier New",monospace;background-color:rgb(255,255,0)">args_info.nodisplaced_flag</span><span style="font-family:"Courier New",monospace">);<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">...</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">using PSSFCPUType = rtk::ParkerShortScanImageFilter<OutputImageType>;</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">PSSFCPUType::Pointer pssf;</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">...</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">pssf->SetAngularGapThreshold(</span><span style="font-family:"Courier New",monospace;background-color:rgb(255,255,0)">args_info.short_arg</span><span style="font-family:"Courier New",monospace">
* itk::Math::pi / 180.);</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">...</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">using StreamerType = itk::StreamingImageFilter<CPUOutputImageType, CPUOutputImageType>;<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">...</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">streamerBP->SetNumberOfStreamDivisions(</span><span style="font-family:"Courier New",monospace;background-color:rgb(255,255,0)">args_info.divisions_arg</span><span style="font-family:"Courier New",monospace">);</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">...<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Can I ask what are purpose do these 3 sections serve and do you think I need to include these 3 sections in my code? If so, what values should I include in the highlighted inputs?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Appreciate your advice and look forward for your reply!</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
lyh<br>
</div>
<div id="gmail-m_8413789966753409397appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8413789966753409397divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>><br>
<b>Sent:</b> Wednesday, January 27, 2021 6:21 PM<br>
<b>To:</b> Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a> <<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>><br>
<b>Subject:</b> Re: [Rtk-users] FirstReconstruction questions</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>Hi,</div>
<div>itk::ChangeInformationImageFilter is encapsulated in rtk::ProjectionsReader, see
<a href="https://github.com/SimonRit/RTK/blob/master/include/rtkProjectionsReader.hxx#L481-L510" target="_blank">
https://github.com/SimonRit/RTK/blob/master/include/rtkProjectionsReader.hxx#L481-L510</a>. Option (3) is the correct one below. SetSpacing should be set according to your knowledge of the pixel spacing on the projections (the third dimension is ignored). SetOrigin
should be set such that coordinate (0,0) on the detector corresponds to the line defined by the source and the center of rotation. If you have centered your detector, that should be -0.5*spacing*(size-1).</div>
<div>Simon<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Wed, Jan 27, 2021 at 8:28 AM Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I am confused when following rtkfdk.cxx for the implementation, because in that file, there is no usage of itk::ChangeInformationFilter. Can I confirm if the usage of itkChangeInformationFilter should be according to one of the following steps?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(1) Read in the projections using itk::ImageSeriesReader and itk::NumericSeriesFileNames -> use itk::ChangeInformationFilter to change spacing and origin -> use rtk::ProjectionsReader to read the images with new spacing and origin<br>
</div>
</div>
</blockquote>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><br>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(2) Read in the projections using rtk::ProjectionsReader and itk::NumericSeriesFileNames -> use itk::ChangeInformationFilter to change spacing and origin<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(3) Read in the projections using rtk::ProjectionsReader and itk::NumericSeriesFileNames and change the spacing and origin using rtk::ProjectionsReader::SetSpacing and rtk::ProjectionsReader::SetOrigin.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
If (3) is the correct method, what input should be in the rtk::ProjectionsReader::SetSpacing and SetOrigin method and how do I get these inputs?<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
If the above steps for reading the input projections are not correct, is it possible to suggest steps which I can read the projections correctly with the correct spacing and origin?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks in advance for the advice and I look forward towards your reply!</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
lyh<br>
</div>
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>><br>
<b>Sent:</b> Thursday, January 21, 2021 10:52 PM<br>
<b>To:</b> Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a> <<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>><br>
<b>Subject:</b> Re: [Rtk-users] FirstReconstruction questions</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi,</div>
<div>Instead of</div>
<div><span style="font-family:"Courier New",monospace">firstSpacing[i]*=0.2;</span></div>
<div>I would have written</div>
<div><span style="font-family:"Courier New",monospace">firstSpacing[i]=0.2;</span></div>
<div>Sorry I did not look closely at the original code but you should modify it. The input images should be read with rtk::ProjectionsReader for being converted to line integrals (using the Beer-Lambert law). The output pixel type should be float or double,
it won't work with integer values. I suggest to follow rtkfdk.cxx for implementing this.</div>
<div>Simon<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Tue, Jan 19, 2021 at 4:59 AM Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Simon,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Sorry to bother you again. Just want to check if I have used itkChangeInformationImageFilter correctly in the snippet of code below:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">using FilterType = itk::ChangeInformationImageFilter<ImageType>;</span>
<div><span style="font-family:"Courier New",monospace">FilterType::Pointer filter = FilterType::New();</span></div>
<div><span style="font-family:"Courier New",monospace">ImageType::ConstPointer inputImage = reader->GetOutput();</span></div>
<div><span style="font-family:"Courier New",monospace">ImageType::PointType firstOrigin = inputImage->GetOrigin();</span></div>
<div><span style="font-family:"Courier New",monospace">ImageType::SpacingType firstSpacing = inputImage->GetSpacing();</span></div>
<div><span style="font-family:"Courier New",monospace"></span></div>
<div><span style="font-family:"Courier New",monospace">for (unsigned int i= 0; i < Dimension;i++) {</span></div>
<div><span style="font-family:"Courier New",monospace">firstSpacing[i]*=0.2;</span></div>
<div><span style="font-family:"Courier New",monospace">}</span></div>
<div><span style="font-family:"Courier New",monospace">filter->SetOutputSpacing(firstSpacing);</span></div>
<div><span style="font-family:"Courier New",monospace">filter->ChangeSpacingOn();</span></div>
<div><span style="font-family:"Courier New",monospace"></span></div>
<div><span style="font-family:"Courier New",monospace">ImageType::PointType::VectorType translation;</span></div>
<div><br>
</div>
<div><span style="font-family:"Courier New",monospace">translation[0] = -0.5*1951*0.2;</span></div>
<div><span style="font-family:"Courier New",monospace">translation[1] = -0.5*1951*0.2;</span></div>
<div><span style="font-family:"Courier New",monospace">translation[2] = -0.5*1951*0.2;</span></div>
<div><br>
</div>
<div><span style="font-family:"Courier New",monospace">firstOrigin += translation;</span></div>
<div><span style="font-family:"Courier New",monospace"></span></div>
<div><span style="font-family:"Courier New",monospace">filter->SetOutputOrigin(firstOrigin);</span></div>
<div><span style="font-family:"Courier New",monospace">filter->ChangeOriginOn();</span></div>
<div><br>
</div>
<span style="font-family:"Courier New",monospace">filter->SetInput(reader->GetOutput());</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">...</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">feldkamp->SetInput(0, constantImageSource->GetOutput());
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">feldkamp->SetInput(1, filter->GetOutput());<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:Calibri,Helvetica,sans-serif">Also, I would like to ask if there are any difference to the </span><span style="font-family:"Courier New",monospace">PixelType </span><span style="font-family:Calibri,Helvetica,sans-serif">being </span><span style="font-family:"Courier New",monospace">unsigned
short</span><span style="font-family:Calibri,Helvetica,sans-serif"> or </span><span style="font-family:"Courier New",monospace">unsigned char</span><span style="font-family:Calibri,Helvetica,sans-serif">? This is because the source code fail to compile when
I used unsigned short on one computer but it works on the other computer.</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:Calibri,Helvetica,sans-serif"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Looking forward to your reply and answers! Much thanks in advance!</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
lyh</div>
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282appendonsend">
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282divRplyFwdMsg" dir="ltr">
<font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>><br>
<b>Sent:</b> Wednesday, January 13, 2021 5:07 PM<br>
<b>To:</b> Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a> <<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>><br>
<b>Subject:</b> Re: [Rtk-users] FirstReconstruction questions</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi,</div>
<div>For the first line (rtksimulatedgeometry), it's already there I believe. For the second line, as I said, you need to use itkChangeInformationImageFilter and set the origin and spacing of the projections equal to those given by newspacing and neworigin.<br>
</div>
<div>Simon<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Wed, Jan 13, 2021 at 9:51 AM Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Simon</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thank you so much for your help; the reconstructed image is almost similar to the image you sent (see attached file). In the previous email, for the command lines</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div><span style="font-family:monospace">rtksimulatedgeometry -n 100 -o g --sid 278.044 --sdd $(echo 278.044+372.528 | bc -l) -f 6.3</span></div>
<div><span style="font-family:monospace">rtkfdk -p images -r p_[0-9]*.tif -o fdk.mha -g g --newspacing 0.2 --neworigin $(echo -0.5*1951*0.2 | bc -l) --spacing 0.25 --dimension 512</span></div>
how do I get this line into the test.cxx file? If there is no way to get these lines into the test.cxx file, then do I run these lines in the terminal?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Look forward for your favourable reply.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
With thanks</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
lyh<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565appendonsend">
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565divRplyFwdMsg" dir="ltr">
<font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>><br>
<b>Sent:</b> Tuesday, January 12, 2021 4:22 AM<br>
<b>To:</b> Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a> <<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>><br>
<b>Subject:</b> Re: [Rtk-users] FirstReconstruction questions</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi lyh,</div>
<div>I had a look at what you've sent. I obtain a first result with the following command lines:</div>
<div><span style="font-family:monospace">rtksimulatedgeometry -n 100 -o g --sid 278.044 --sdd $(echo 278.044+372.528 | bc -l) -f 6.3</span></div>
<div><span style="font-family:monospace">rtkfdk -p images -r p_[0-9]*.tif -o fdk.mha -g g --newspacing 0.2 --neworigin $(echo -0.5*1951*0.2 | bc -l) --spacing 0.25 --dimension 512<br>
</span></div>
<div>The newspacing and neworigin options set the projections spacing and origin with the ChangeInformationImageFilter. The result is not perfect, I believe the geometry is not right yet. Maybe there is a detector offset you're not aware of? But your text file
indicate no offset so I don't know what's wrong. Attached is a snapshot. There are also some dead pixels which you could try to prefilter.<br>
</div>
<div>I hope this helps. Cheers,</div>
<div>Simon<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Tue, Jan 5, 2021 at 5:35 PM Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I cannot send the projections via email as the projections are too big in size. Instead, I am sharing the files on Drive, with the hyperlink as below. In the folder, there is a subset of 100 projections out of the 800 projections, with the angle between each
projection being 3.6 degrees. There are other details on the projects as listed in report.txt file in the folder.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Google drive share link:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<a href="https://drive.google.com/drive/folders/1wMRo3Rmr6HszUVil0vEsLPtLSLftFyfQ?usp=sharing" id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565x_gmail-m_4994640668561699945LPlnk116246" target="_blank">https://drive.google.com/drive/folders/1wMRo3Rmr6HszUVil0vEsLPtLSLftFyfQ?usp=sharing</a></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
lyh<br>
</div>
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565x_gmail-m_4994640668561699945appendonsend">
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565x_gmail-m_4994640668561699945divRplyFwdMsg" dir="ltr">
<font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>><br>
<b>Sent:</b> Tuesday, January 5, 2021 5:21 PM<br>
<b>To:</b> Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a> <<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>><br>
<b>Subject:</b> Re: [Rtk-users] FirstReconstruction questions</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi,</div>
<div>I think the issue is that your projection images are given in the TIFF file format which does not contain important meta information such as the origin and the spacing of the projections. You should use
<a href="https://itk.org/Doxygen/html/classitk_1_1ChangeInformationImageFilter.html" target="_blank">
ChangeInformationFilter</a> to set these. I'm guessing that the origin is currently (0,0) and since you do not set any offsets when using AddProjection, it comes down to having the corner of your projection aligned with the central ray (line defined by the
source and the center of rotation).</div>
<div>You can share projections or a subset of them if you'd like us to give it a try with your code.</div>
<div>Good luck!</div>
<div>Simon<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Mon, Jan 4, 2021 at 4:35 PM Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The code is as attached. Just for further reference, I am given images as attached, and there are 800 of them, with 0.45 degrees separating each frame. The naming of the screenshots depicts the frame that it is in.
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks in advance for the advice and help!! I really appreciate this community <span id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565x_gmail-m_4994640668561699945x_gmail-m_-9043481848435839607gmail-m_4926400425546106679🙂">
🙂</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
lyh<br>
</div>
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565x_gmail-m_4994640668561699945x_gmail-m_-9043481848435839607gmail-m_4926400425546106679appendonsend">
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565x_gmail-m_4994640668561699945x_gmail-m_-9043481848435839607gmail-m_4926400425546106679divRplyFwdMsg" dir="ltr">
<font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>><br>
<b>Sent:</b> Wednesday, December 30, 2020 9:35 PM<br>
<b>To:</b> Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a> <<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>><br>
<b>Subject:</b> Re: [Rtk-users] FirstReconstruction questions</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi,</div>
<div>RTK cone beam reconstruction filters expect line integrals but the projection that you are showing seems to have the highest value in air. RTK automatically processes such projections with log and normalization if the pixels are unsigned short. Otherwise,
you need to do it yourself.<br>
</div>
<div>It is not clear if the geometry is correct from the reconstruction screen shot. The best would be to share your code if you want us to have a look.</div>
<div>Simon<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Mon, Dec 28, 2020 at 8:34 AM Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div style="margin:0px;font-size:12pt;color:black;background-color:white">Dear Simon and the RTK community</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white"><br>
</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white">Really thank you for the answer, and really sorry for the late reply. I am trying to reconstruct a 3d model using 800 images, rotating an object 360 degrees using rtk::ThreeDCircularProjectionGeometry,
rtk::ConstantImageSource and rtk:: FDKConeBeamReconstructionFilter from the FirstReconstruction example as well as itk::ImageSeriesReader.</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white"><br>
</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white">However, the reconstruction created is shown above in the screenshot and after checking all the parameters, I have no idea on how to move forward from here. From reading the forums,
I think that I should do one more image filter before applying the cone beam reconstruction? However, I am not too sure. Please advise on the next steps that can enable me to get the 3d reconstruction.</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white"><br>
</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white">Thanks so much in advance and look forward to everyone's reply!!</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white"><br>
</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white">PS: the tif file is just 1 of the 800 images I am given to reconstruct the object</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white"><br>
</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white">Regards</div>
<div style="margin:0px;font-size:12pt;color:black;background-color:white">lyh</div>
<br>
</div>
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565x_gmail-m_4994640668561699945x_gmail-m_-9043481848435839607gmail-m_4926400425546106679x_gmail-m_-2603944410746494337appendonsend">
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8413789966753409397x_gmail-m_3248568340738436845x_gmail-m_-2413941611289915282x_gmail-m_2010060914223583565x_gmail-m_4994640668561699945x_gmail-m_-9043481848435839607gmail-m_4926400425546106679x_gmail-m_-2603944410746494337divRplyFwdMsg" dir="ltr">
<font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>><br>
<b>Sent:</b> Wednesday, December 9, 2020 4:23 PM<br>
<b>To:</b> Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>><br>
<b>Cc:</b> <a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a> <<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>><br>
<b>Subject:</b> Re: [Rtk-users] FirstReconstruction questions</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi,</div>
<div>constantImageSource creates a constant volume. In the example, one is used as input of the simulation of projections of an ellipsoid (rei) and one as input of the reconstruction algorithm (feldkamp). fieldofview masks out (i.e., set to 0) voxels which
are not in the field of view.</div>
<div>I don't understand your screenshot either but if you use the tiff format, make sure you use a viewer capable of dealing with 3D tiff images (e.g.,
<a href="http://vv.creatis.insa-lyon.fr" target="_blank">vv</a> or ImageJ).</div>
<div>Simon<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Wed, Dec 9, 2020 at 8:59 AM Lai Yao Hao <<a href="mailto:yao_hao777@hotmail.com" target="_blank">yao_hao777@hotmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi to all the rtk-users</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I am a new user of rtk, and I have some questions regarding the FirstReconstruction example given in github. I have generated an image as attached, with 4 tiny ball-like drawing hanging from the top. Can anyone explain to me why do I get such image and what
are the implications of constantImageSource, rei, constantImageSource2, feldkamp and fieldofview?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Your explanation will be much appreciated. Thanks in advance!</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
lyh<br>
</div>
</div>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote></div>