<div dir="ltr"><div>Hi Sebastien,</div><div> </div><div>Thank you very much for your explanation. I used -d to write I0 estimations to a file. I found there are >2000 numbers for ~600 projections. I thought there would be one number for each projection, but obviously the output numbers are not generated that way. Could you please describe a bit more on the file format and how to use them? Or simply I wait for your new mini-pipeline filter?</div><div> </div><div>Regards,</div><div>-howard</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 7, 2015 at 3:01 AM, Sébastien Brousmiche <span dir="ltr"><<a href="mailto:sebastien.brousmiche@uclouvain.be" target="_blank">sebastien.brousmiche@uclouvain.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" vlink="purple" link="blue"><div><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt">Hi Howard,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt">There is an input parameter with the rtki0estimation application (-d) which allows you to specify the output file with I0 estimates.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt">The big file you mentioned contains the histograms of each image (65536 values each) stored consecutively. The first value is the occurrence of number 0 in your image, second.. 1 and so forth up to 65535.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt">This application is not particularly interesting to be used in a pipeline.  <u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt">Nevertheless, we are developing a mini-pipeline grouping typical preprocessing filters. It is under validation and I’ll let you know as soon as it is available for you.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt">Best,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt">Sébastien<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Century","serif";font-size:11pt"><u></u> <u></u></span></p><div style="border-width:medium medium medium 1.5pt;border-style:none none none solid;border-color:currentColor currentColor currentColor blue;padding:0cm 0cm 0cm 4pt"><div><div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(181,196,223) currentColor currentColor;padding:3pt 0cm 0cm"><p class="MsoNormal"><b><span style="font-family:"Tahoma","sans-serif";font-size:10pt">From:</span></b><span style="font-family:"Tahoma","sans-serif";font-size:10pt"> Rtk-users [mailto:<a href="mailto:rtk-users-bounces@public.kitware.com" target="_blank">rtk-users-bounces@public.kitware.com</a>] <b>On Behalf Of </b>Howard<br><b>Sent:</b> mercredi 7 janvier 2015 00:17<br><b>To:</b> Simon Rit<br><b>Cc:</b> <a href="mailto:rtk-users@openrtk.org" target="_blank">rtk-users@openrtk.org</a><br><b>Subject:</b> Re: [Rtk-users] ADMMTVReconstruction<u></u><u></u></span></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">Happy New Year, Simon.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thank you for pointing to me the I0 estimate procedure.I saw an application rtki0estimation<u></u><u></u></p></div><div><p class="MsoNormal">under  the Applications folder. Is this the tool you meant? I ran it using all default parameters<u></u><u></u></p></div><div><p class="MsoNormal">providing with the original projection data. What I obtained was a file: i0est_histogram.csv.<u></u><u></u></p></div><div><p class="MsoNormal">From the comments in rtki0estimation.ggo this file is the output with I0 estimate. For 650 projections<u></u><u></u></p></div><div><p class="MsoNormal">the file size is around 200MB. I used excel to open the file and found that the beginning two numbers<u></u><u></u></p></div><div><p class="MsoNormal">64408 and 722024 then followed by 0's. In the middle there are some nonzero numbers. Essentially<u></u><u></u></p></div><div><p class="MsoNormal">all zeros. <u></u><u></u></p></div><div><p class="MsoNormal">Since there is not much description of the application, so it is hard to figure out easily what I am doing.<u></u><u></u></p></div><div><p class="MsoNormal">I tried to read the source code, but it might be more useful if you can give some hints on how to <u></u><u></u></p></div><div><p class="MsoNormal">use it. <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Regards,<u></u><u></u></p></div><div><p class="MsoNormal">-howard<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Mon, Jan 5, 2015 at 1:49 AM, Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>> wrote:<u></u><u></u></p><p class="MsoNormal">Happy new year Howard,<br>Normally, this calibration is handled by the flat panel. It uses an<br>air projection and a dark (no beam) projection to compute the line<br>integral. However, there might be fluctuations in time of these two<br>projections. Some people do regular acquisitions of them to capture<br>the time fluctuations. Otherwise, a constant value might be a good<br>solution. Sébastien has recently implemented an automated<br>determination of this constant, maybe you should have a look:<br><a href="http://www.openrtk.org/Doxygen/classrtk_1_1I0EstimationProjectionFilter.html" target="_blank">http://www.openrtk.org/Doxygen/classrtk_1_1I0EstimationProjectionFilter.html</a><br>It is already part of the mini-pipeline for ImagX / IBA projections processing:<br><a href="http://www.openrtk.org/Doxygen/classrtk_1_1ImagXRawToAttenuationImageFilter.html" target="_blank">http://www.openrtk.org/Doxygen/classrtk_1_1ImagXRawToAttenuationImageFilter.html</a><br><span><span style="color:rgb(136,136,136)">Simon</span></span><u></u><u></u></p><div><div><p class="MsoNormal"><br>On Fri, Jan 2, 2015 at 10:17 PM, Howard <<a href="mailto:lomahu@gmail.com" target="_blank">lomahu@gmail.com</a>> wrote:<br>> Happy New Year, Cyril.<br>><br>> I realized that our projection data is having some issues with air<br>> correction. We checked our calibration and it appeared fine. Do you know by<br>> any chance whether there is a quick way of correcting that? I searched<br>> around and found people used a constant air norm image.<br>><br>> Thanks very much,<br>> -howard<br>><br>> On Thu, Dec 18, 2014 at 5:13 AM, Cyril Mory<br>> <<a href="mailto:cyril.mory@creatis.insa-lyon.fr" target="_blank">cyril.mory@creatis.insa-lyon.fr</a>> wrote:<br>>><br>>> Hi Howard,<br>>><br>>> I've taken a look at your data.<br>>> You can apply tv denoising on the out.mha volume and obtain a<br>>> significantly lower level of noise without blurring structures by using the<br>>> following command :<br>>> rtktotalvariationdenoising -i out.mha -g 0.001 -o<br>>> tvdenoised/gamma0.001.mha -n 100<br>>><br>>> I was unable to obtain good results with iterative reconstruction from the<br>>> projection data you sent, though. I think the main reason for this is that<br>>> your projections have much-higher-than-zero attenuation in air. Your<br>>> calculation of i0 when converting from intensity to attenuation is probably<br>>> not good enough. Try to correct for this effect first. Then you can start<br>>> performing SART and Conjugate Gradient reconstructions on your data, and<br>>> once you get these right, play with ADMM.<br>>><br>>> You might need to remove the table from the projections to be able to<br>>> restrict the reconstruction volume strictly to the patient, and speed up the<br>>> computations. We can provide help for that too.<br>>><br>>> Best regards,<br>>> Cyril<br>>><br>>><br>>> On 12/17/2014 05:02 PM, Howard wrote:<br>>><br>>> Hi Cyril,<br>>><br>>> I've sent you two files via <a href="http://wetransfer.com" target="_blank">wetransfer.com</a>: one is the sparse projection<br>>> set with geometry file and the other is the fdk reconstructed image based on<br>>> full projection set. Please let me know if you have trouble receiving them.<br>>><br>>> Thanks very much for looking into this.<br>>><br>>> -Howard<br>>><br>>> On Wed, Dec 17, 2014 at 10:19 AM, Cyril Mory<br>>> <<a href="mailto:cyril.mory@creatis.insa-lyon.fr" target="_blank">cyril.mory@creatis.insa-lyon.fr</a>> wrote:<br>>>><br>>>> Hi Howard,<br>>>><br>>>> Thanks for the detailed feedback.<br>>>> The image getting blurry is typically due to a too high gamma. Depending<br>>>> on you data, gamma can have to be set to a very small value (I use 0.007 in<br>>>> some reconstructions on clinical data). Can you send over your volume<br>>>> reconstructed from full projection data, and I'll have a quick look ?<br>>>><br>>>> There is a lot of instinct in the setting of the parameters. With time,<br>>>> one gets used to finding a correct set of parameters without really knowing<br>>>> how. I can also try to reconstruct from your cbct data if you send me the<br>>>> projections and the geometry.<br>>>><br>>>> Best regards,<br>>>> Cyril<br>>>><br>>>><br>>>> On 12/17/2014 03:49 PM, Howard wrote:<br>>>><br>>>> Hi Cyril,<br>>>><br>>>> Thanks very much for your detailed and nice description on how to use the<br>>>> admmtv reconstruction. I followed your suggestions and re-ran<br>>>> reconstructions using admmtotalvariation and admmwavelets with cbct<br>>>> projection data from a thoracic patient.<br>>>><br>>>> I am reporting what I found and hope these will give you information for<br>>>> further improvement.<br>>>><br>>>> 1. I repeated admmtotalvariation with 30 iterations. No improvement was<br>>>> observed. As a matter of fact, the reconstructed image is getting a lot<br>>>> noiser compared to that using 3 iterations. The contrast is getting worse as<br>>>> well. I tried to play around with window & level in case I was fooled but<br>>>> apparently more iterations gave worse results.<br>>>><br>>>> 2. Similarly I ran 30 iterations using admmwavelets. Slightly better<br>>>> reconstruction compared with total variation.<br>>>><br>>>> 3. Then I went ahead to test if TV benefits us anything using the<br>>>> tvdenoising application on the fdk-reconstructed image reconstructed from<br>>>> full projection set. I found that the more iterations, the more blurry the<br>>>> image became. For example, with 50 iterations the contrast on the denoised<br>>>> image is very low so that the vertebrae and surrounding soft tissue are<br>>>> hardly distinguishable. Changing gamma's at 0.2, 0.5, 1.0, 10  did not seem<br>>>> to make a difference on the image. With 5 iterations the denoising seems to<br>>>> work fairly well. Again, changing gamma's didn't make a difference.<br>>>> I hope I didn't misused the totalvariationdenoising application. The<br>>>> command I executed was: rtktotalvariationdenoising -i out.mha -o<br>>>> out_denoising_n50_gamma05 --gamma 0.5 -n 50<br>>>><br>>>> In summary, tdmmwavelets seems perform better than tdmmtotalvariation but<br>>>> neither gave satisfactory results. No sure what we can infer from the TV<br>>>> denoising study. I could send my study to you if there is a need. Please let<br>>>> me know what tests I could run. Further help on improvement is definitely<br>>>> welcome and appreciated.<br>>>><br>>>> -Howard<br>>>><br>>>> On Mon, Dec 15, 2014 at 4:07 AM, Cyril Mory<br>>>> <<a href="mailto:cyril.mory@creatis.insa-lyon.fr" target="_blank">cyril.mory@creatis.insa-lyon.fr</a>> wrote:<br>>>>><br>>>>> Hello Howard,<br>>>>><br>>>>> Good to hear that you're using RTK :)<br>>>>> I'll try to answer all your questions, and give you some advice:<br>>>>> - In general, you can expect some improvement over rtkfdk, but not a<br>>>>> huge one<br>>>>> - You can find the calculations in my PhD thesis<br>>>>> <a href="https://tel.archives-ouvertes.fr/tel-00985728" target="_blank">https://tel.archives-ouvertes.fr/tel-00985728</a> (in English. Only the<br>>>>> introduction is in French)<br>>>>> - Adjusting the parameters is, in itself, a research topic (sorry !).<br>>>>> Alpha controls the amount of regularization and only that (the higher, the<br>>>>> more regularization). Beta, theoretically, should only change the<br>>>>> convergence speed, provided you do an infinite number of iterations (I know<br>>>>> it doesn't help, sorry again !). In practice, beta is ubiquitous and appears<br>>>>> everywhere in the calculations, therefore it is hard to predict what effect<br>>>>> an increase/decrease of beta will give on the images. I would keep it as is,<br>>>>> and play on alpha<br>>>>> - 3 iterations is way too little. I typically used 30 iterations. Using<br>>>>> the CUDA forward and back projectors helped a lot maintain the computation<br>>>>> time manageable<br>>>>> - The quality of the results depends a lot on the nature of the image<br>>>>> you are trying to reconstruct. In a nutshell, the algorithm assumes that the<br>>>>> image you are reconstructing has a certain form of regularity, and discards<br>>>>> the potential solutions that do not have it. This assumption partly<br>>>>> compensates for the lack of data. ADMM TV assumes that the image you are<br>>>>> reconstructing is piecewise constant, i.e. has large uniform areas separated<br>>>>> by sharp borders. If your image is a phantom, it should give good results.<br>>>>> If it is a real patient, you should probably change to another algorithm<br>>>>> that assumes another form of regularity in the images (try rtkadmmwavelets)<br>>>>> - You can find out whether you typical images can benefit from TV<br>>>>> regularization by reconstructing from all projections with rtkfdk, then<br>>>>> applying rtktotalvariationdenoising on the reconstructed volume (try 50<br>>>>> iterations and adjust the gamma parameter: high gamma means high<br>>>>> regularization). If this denoising implies an unacceptable loss of quality,<br>>>>> stay away from TV for these images, and try wavelets<br>>>>><br>>>>> I hope this helps<br>>>>><br>>>>> Looking forward to reading you again,<br>>>>> Cyril<br>>>>><br>>>>><br>>>>> On 12/12/2014 06:42 PM, Howard wrote:<br>>>>><br>>>>> I am testing the ADMM total variation reconstruction with sparse data<br>>>>> sample. I could reconstruct but the results were not as good as expected. In<br>>>>> other words, it didn't show much improvement compared to fdk reconstruction<br>>>>> using the same sparse projection data.<br>>>>><br>>>>> The parameters I used in ADMMTV were the following:<br>>>>><br>>>>> --spacing 2,2,2 --dimension 250,100,250 --alpha 1 --beta 1000 -n 3<br>>>>><br>>>>> while the fdk reconstruction parameters are:<br>>>>><br>>>>> --spacing 2,2,2 --dimension 250,100,250 --pad 0.1 --hann 0.5<br>>>>><br>>>>> The dimensions were chosen to include the entire anatomy. 72 projections<br>>>>> were selected out of 646 projections for a 360 degree scan for both<br>>>>> calculations.<br>>>>><br>>>>> What parameters and how can I adjust (like alpha, beta, or iterations?)<br>>>>> to improve the ADMMTV reconstruction? There is not much description of this<br>>>>> application from the wiki page.<br>>>>><br>>>>> Thanks,<br>>>>><br>>>>> -howard<br>>>>><br>>>>><br>>>>><br>>>>> _______________________________________________<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="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>>>>><br>>>>><br>>>>> --<br>>>>> --<br>>>>> Cyril Mory, Post-doc<br>>>>> CREATIS<br>>>>> Leon Berard cancer treatment center<br>>>>> 28 rue Laënnec<br>>>>> 69373 Lyon cedex 08 FRANCE<br>>>>><br>>>>> Mobile: <a href="tel:%2B33%206%2069%2046%2073%2079" target="_blank">+33 6 69 46 73 79</a><br>>>><br>>>><br>>>> --<br>>>> --<br>>>> Cyril Mory, Post-doc<br>>>> CREATIS<br>>>> Leon Berard cancer treatment center<br>>>> 28 rue Laënnec<br>>>> 69373 Lyon cedex 08 FRANCE<br>>>><br>>>> Mobile: <a href="tel:%2B33%206%2069%2046%2073%2079" target="_blank">+33 6 69 46 73 79</a><br>>><br>>><br>>> --<br>>> --<br>>> Cyril Mory, Post-doc<br>>> CREATIS<br>>> Leon Berard cancer treatment center<br>>> 28 rue Laënnec<br>>> 69373 Lyon cedex 08 FRANCE<br>>><br>>> Mobile: <a href="tel:%2B33%206%2069%2046%2073%2079" target="_blank">+33 6 69 46 73 79</a><br>><br>><br>><br>> _______________________________________________<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="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>><u></u><u></u></p></div></div></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div>
<br><br>
<hr style="border:currentColor;width:99%;color:rgb(144,144,144);min-height:1px;background-color:rgb(176,176,176)">
<table style="border:currentColor;border-collapse:collapse">
        <tbody><tr>
                <td style="padding:0px 15px 0px 8px;border:currentColor">
                        <a href="http://www.avast.com/" target="_blank">
                                <img src="http://static.avast.com/emails/avast-mail-stamp.png" border="0">
                        </a>
                </td>
                <td>
                        <p style="color:rgb(61,77,90);font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
                                Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection <a href="http://www.avast.com/" target="_blank">Antivirus avast!</a> est active.
                        </p>
                </td>
        </tr>
</tbody></table>
<br>
</div></blockquote></div><br></div>