From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Mon Jun 1 12:53:44 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 1 Jun 2015 18:53:44 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice Message-ID: Hi all, When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems to rerun unnecessarily. Details below: In FDKConeBeamReconstructionFilter::GenerateData() the three sub-filters run separately for timing: m_PreFilterProbe.Start(); m_WeightFilter->Update(); m_PreFilterProbe.Stop(); m_FilterProbe.Start(); m_RampFilter->Update(); m_FilterProbe.Stop(); m_BackProjectionProbe.Start(); m_BackProjectionFilter->Update(); m_BackProjectionProbe.Stop(); However with some debug procedure I found when executing m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's something wrong with filter modified time or flags of CPU/GPU buffer? Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let m_BackProjectionFilter execute the whole minipipeline, all filters will run nicely only once for each projection subset. The results are identical for all cases I tested. I did not check whether the same issue applies to the CPU or OpenCL version. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 1 15:37:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 1 Jun 2015 21:37:36 +0200 Subject: [Rtk-users] Linking error with rtkLookupTableImageFilter.h In-Reply-To: <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> References: <7D6AC078C6120348BBBA81A076369E6287C7D43BBB@EXCH-MBX-C.ulaval.ca> <7D6AC078C6120348BBBA81A076369E6287C7D43BBC@EXCH-MBX-C.ulaval.ca> Message-ID: Thanks, it's been pushed to the public repository: https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab Simon On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin < julia.mascolo-fortin.1 at ulaval.ca> wrote: > Hi, > > Thanks, declaring inline those functions corrected my problem. > > Julia > ________________________________________ > De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [ > simon.rit at creatis.insa-lyon.fr] > Date d'envoi : 30 mai 2015 05:49 > ? : Julia Mascolo-Fortin > Cc : rtk-users at public.kitware.com > Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h > > Hi, > I didn't manage to reprocude your problem quickly but my guess is that > the problem is that the template specializations in this class have > not been declare inline. Can you try to use the attached file, > recompile RTK and then your software to check if this solves the > problem? > Thanks for the report and please don't hesitate to report your other > 'shared libs option' bug. > Simon > > On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin > wrote: > > Hi, > > > > I'm having a linking error with a RTK project when I include the file > rtkLookupTableImageFilter.h (or any RTK file that includes it). > > If the #include is in the main.cxx, the program compiles and run, but if > it's in any other source or header files, I see those errors: > > > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT float>::operator()(float const&) const': > > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT float>::operator()(float const&) const' > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0): > first defined here > > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT double>::operator()(double const&) const': > > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT double>::operator()(double const&) const' > > > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0): > first defined here > > > > > > Also, when I comment the lines where the functions > rtk::Functor::LUT::operator()(float const&) const and > rtk::Functor::LUT::operator()(double const&) const are > defined (lines 96 to 112) the program compiles juste fine. > > > > I use: > > > > OS: Linux (Mageia 2) > > Compiler: gcc 4.6.3 > > ITK version: 4.5.1 > > RTK version: the one downloaded from git on May 28 2015 > > > > I have compiled RTK and ITK in Release mode and without the shared libs > option (there's another bug if I try to put this option on). > > > > > > > > Thank you for any clue on how to solve the problem, > > > > Julia Mascolo-Fortin > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 07:32:31 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 14:32:31 +0300 Subject: [Rtk-users] Clamp voxel' value in the reconstructed Volume Message-ID: Hi all, I was wondering how to clamp the voxel's value of the volume. i mean, if in the reconstructed volume, the voxel values range is from [-0.1 ,3.7] how could i clamp it to [0,1]??? Because when compared the groundtruth volume, The volume from RTK looks much brighter. so do we have a flag in RTK' algorithms(like SART ,ADMM) or some specific application to do this kind of thing?? thanks in advance. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 2 09:43:47 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 16:43:47 +0300 Subject: [Rtk-users] The results still much brighter after clamping operation Message-ID: Sorry to bother you again. After i clamped the volume values' range ,i find that the results from SART and ADMM in RTK still brighter than ground truth volume and the volume reconstructed from my implementation. here is the description in detail: i wanna test the reconstruction result of Shepp-Logan. by using the ground truth volume , i generated 360 projections. and use these projections images as input both for my project and RTK to reconstruct a volume. but the result from RTK looks a little brighter. After checking in the ground truth volume, i found that the all voxel values are in the range[0,1] while it is [-0.1,3.5] in RTK's results. so i clamped the voxel value of the volume generated from RTK. i thought that maybe SART algorithm is not accurate, so i ran the ADMMTV and FDK as well in RTK , but got the similar results.i.e., the voxel range are about [-0.1, 3.6] , and after clamped it, the results still brighter, pls see attached images. So, is it a calibration problem or some normalization issue in RTK??? Thanks very much. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602162752.bmp Type: image/bmp Size: 171414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QQ??20150602163054.bmp Type: image/bmp Size: 165006 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 11:43:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 17:43:27 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, It looks bad but I couldn't reproduce the problem. What I did is add messages in the GPUGenerateData and launch a very simple sequence of command lines: rtksimulatedgeometry -n 8 -o g rtkprojectshepploganphantom -g g -o proj.mha rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda in which case I go only once in each GPUGenerateData. Can you give us a command line example where you can see the problem? Thanks, Simon On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > Hi all, > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter seems > to rerun unnecessarily. Details below: > > In FDKConeBeamReconstructionFilter TFFTPrecision>::GenerateData() the three sub-filters run separately for > timing: > > m_PreFilterProbe.Start(); > m_WeightFilter->Update(); > m_PreFilterProbe.Stop(); > > m_FilterProbe.Start(); > m_RampFilter->Update(); > m_FilterProbe.Stop(); > > m_BackProjectionProbe.Start(); > m_BackProjectionFilter->Update(); > m_BackProjectionProbe.Stop(); > > However with some debug procedure I found when executing > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > something wrong with filter modified time or flags of CPU/GPU buffer? > > Furthermore, if I remove m_WeightFilter->Update() then both m_WeightFilter > and m_RampFilter will rerun during update of m_BackProjectionFilter. Only if > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > m_BackProjectionFilter execute the whole minipipeline, all filters will run > nicely only once for each projection subset. > > The results are identical for all cases I tested. > > I did not check whether the same issue applies to the CPU or OpenCL version. > > Regards, > Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Tue Jun 2 13:56:39 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 20:56:39 +0300 Subject: [Rtk-users] Geometry settings Message-ID: Hi Simon, Thanks for prompt reply. Actually, i used one iteration in FDK reconstruction, and 20 iterations in ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. Now i am thinking maybe the problem is caused by geometry settings, and if so, i really need your help: In my own project, i use the "cone beam angle" and the "souce to isocenter distance"(same as sid in RTK) to set the scene,please see the attached geometry image. To make the same geometry in RTK , if the Projection size is A(pls see the attached image), and the detector length is B(i.e., the projection image size is B). in RTK , i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the reconstructed volume size and slice size are same with ground truth, but i am really not sure it is right or not.(the projection image is .bmp files,i do not know the dpi) i do not know i described it clearly or not. if you need more information ,please let me know. Really appreciated for the help. Regards *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.jpg Type: image/jpeg Size: 71748 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 2 14:15:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 2 Jun 2015 20:15:44 +0200 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Hi, Yes, after looking at the images again, there is clearly a geometry problem. I don't understand what is your geometry but since you have a lot of information for RTK geometry (wiki document + code), maybe it's up to you to figure it out? Good luck and regards, Simon On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang wrote: > Hi Simon, > Thanks for prompt reply. > Actually, i used one iteration in FDK reconstruction, and 20 iterations in > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > Now i am thinking maybe the problem is caused by geometry settings, and if > so, i really need your help: > In my own project, i use the "cone beam angle" and the "souce to isocenter > distance"(same as sid in RTK) to set the scene,please see the attached > geometry image. > > To make the same geometry in RTK , if the Projection size is A(pls see the > attached image), and the detector length is B(i.e., the projection image > size is B). in RTK , > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > reconstructed volume size and slice size are same with ground truth, but i > am really not sure it is right or not.(the projection image is .bmp files,i > do not know the dpi) > > i do not know i described it clearly or not. if you need more information > ,please let me know. > Really appreciated for the help. > Regards > > > Guangming Zang (Alex) > King Abdullah University of Science and Technology(KAUST) > University of Chinese Academy of Sciences(UCAS) > > > > > ________________________________ > This message and its contents, including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. From guangming.zang at kaust.edu.sa Tue Jun 2 14:20:37 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 2 Jun 2015 21:20:37 +0300 Subject: [Rtk-users] Geometry settings In-Reply-To: References: Message-ID: Yes, sure. Simon. If you think the geometry setting is not correct from the reconstructed images. Of course it is I that should figure it out. Thanks again for the help. :) Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-02 21:15 GMT+03:00 Simon Rit : > Hi, > Yes, after looking at the images again, there is clearly a geometry > problem. I don't understand what is your geometry but since you have a > lot of information for RTK geometry (wiki document + code), maybe it's > up to you to figure it out? > Good luck and regards, > Simon > > On Tue, Jun 2, 2015 at 7:56 PM, Guangming Zang > wrote: > > Hi Simon, > > Thanks for prompt reply. > > Actually, i used one iteration in FDK reconstruction, and 20 iterations > in > > ADMMTV(5 conjugate gradient in each ADMM), which is enough i think. > > Now i am thinking maybe the problem is caused by geometry settings, and > if > > so, i really need your help: > > In my own project, i use the "cone beam angle" and the "souce to > isocenter > > distance"(same as sid in RTK) to set the scene,please see the attached > > geometry image. > > > > To make the same geometry in RTK , if the Projection size is A(pls see > the > > attached image), and the detector length is B(i.e., the projection image > > size is B). in RTK , > > i set the SDD=SDD*B/A, and SID=SID. i thought it is correct because the > > reconstructed volume size and slice size are same with ground truth, but > i > > am really not sure it is right or not.(the projection image is .bmp > files,i > > do not know the dpi) > > > > i do not know i described it clearly or not. if you need more information > > ,please let me know. > > Really appreciated for the help. > > Regards > > > > > > Guangming Zang (Alex) > > King Abdullah University of Science and Technology(KAUST) > > University of Chinese Academy of Sciences(UCAS) > > > > > > > > > > ________________________________ > > This message and its contents, including attachments are intended solely > for > > the original recipient. If you are not the intended recipient or have > > received this message in error, please notify me immediately and delete > this > > message from your computer system. Any unauthorized use or distribution > is > > prohibited. Please consider the environment before printing this email. > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 2 14:21:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 02 Jun 2015 14:21:46 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556DA9D6.4070006@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: Hi Jonathan, Please try to keep the discussions on RTK on the mailing list, so that everyone can benefit from the questions and answers. About the disk artifact you observe, could you try another iterative algorithm, like for example SART (same parameters, only less iterations, 4 is sufficient), and let us know whether the same artifact is present in your results ? If the artifact is only present in the CG result, then I'll have to take a deep dive into the CG code and the way the weighting is performed. Regarding PICCS, many things come to my mind: - it mostly depends on the algorithm you would like to use to minimize the PICCS cost function. If you want to maximize re-use of available RTK code, I recommend you adopt an alternating scheme : minimize the data attachment term, then the TV of the volume, then the TV of the difference between volume and prior, and repeat. You can do that with the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the other hand, you want a more theoretically solid minimization algorithm, you will need more implementation work - that being said, my personal experience with PICCS, on 4D C-arm CT of the human heart, was disappointing. If you intend to use PICCS to reconstruct either beating heart or free-breathing thorax data, I would recommend you try rtkfourdrooster (and maybe read the paper that compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography using a 3D + time ROI reconstruction method with spatial and temporal regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) - if you do implement PICCS, it would be a valuable addition to RTK, so I encourage you to submit it :) All the best, Cyril On 2015-06-02 09:04, Jonathan Mason wrote: > Hi Cyril, > > Thank you for your response. It indeed seems as though the artefact is > due to the geometry mismatch, and I believe it originates from a > calibration issue with the machine, so when I get access again I will > try to fix this. You are also correct about my blurry reconstruction, > and running for a decent number of iterations generates an image more > comparable to FDK, though still with the disk present. In the mean > time, > I have been exploring more of the software package on some synthetic > data. > > I would like to implement a PICCS like reconstruction by incorporating > prior image regularisation. What would you recommend the best approach > to this task. Would it be possible to realise it with an application > calling RTK functions, or would I need to construct new templates for > it? > > Many thanks, > > Jonathan > On 07/05/15 15:25, mory wrote: >> Hi Jonathan, >> >> Welcome to RTK ! >> The artefact you see is indeed caused by the offset detector, but from >> the documentation and the code, it seems that the "displaced detector >> filter" should do its job in rtkconjugategradient, so I'm kind of >> puzzled. >> Your conjugate gradient reconstruction is very blurry. I guess you >> used a very small number of iterations. Can you re-run it with 30 >> iterations and see what happens ? >> >> Best regards, >> Cyril >> >> On 2015-05-07 14:38, Simon Rit wrote: >>> Hi, >>> Probably an offset detector artefact. Look at this conversation: >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> [2] >>> Maybe try one of the algorithms that properly uses the offset >>> detector >>> filter? For the FOV, the option --displaced will provide the full >>> FOV. >>> I hope this helps, >>> Simon >>> >>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>> wrote: >>> >>>> Hello RTK users, >>>> >>>> I have been using RTK for a couple of weeks now, and really like >>>> the >>>> software. The extensive number of tools available is really >>>> impressive >>>> and helpful, so thanks! >>>> >>>> I have been experiencing an cylindrical artefact in using conjugate >>>> gradient reconstruction ? illustrated in the attached images >>>> along with >>>> FDK with no artefact ? of which I am unsure of its origin. The >>>> data is a >>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>> suspected it was due to the specimen extending beyond the >>>> reconstruction >>>> volume, but extending this unfortunately did not help. Something >>>> else I >>>> have noticed is that the FOV filter isolates just this pale >>>> cylindrical >>>> artefact around the centre of rotation. >>>> >>>> Do you know of the cause of this effect, or how it could be >>>> remedied? >>>> >>>> Best wishes, >>>> >>>> Jonathan >>>> >>>> -- >>>> The University of Edinburgh is a charitable body, registered in >>>> Scotland, with registration number SC005336. >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>> >>> >>> >>> Links: >>> ------ >>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>> [2] >>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> From wuchao04 at gmail.com Tue Jun 2 17:08:52 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 2 Jun 2015 23:08:52 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Simon, I found how to reproduce it. Instead of using proj.mha, if you use separate projection files (e.g. proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The --subsetsize is needed to show the issue (not necessarily =1 but should let the for loop in the FDK filter run several times). The issue is not in the first time the for loop runs, but only in sequential ones. Here's my output using separate tif files as projections: without -l it runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is normal, next ones weight filter run twice). D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda --subsetsize 1 -l CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() CudaFDKWeightProjectionFilter::GPUGenerateData() When I print out the GRAM activities by #define VERBOSE in itkCudaDataManager.h and add some other debug info in the code (before and after filter->Update(), and at the beginning and end of GPUGenerateData() of the filters) I have the following log showing the problem with -l flag on (I show below the log of the first 4 projections and hope it is still readable...) When I focus on the CudaDataManager that updates (copies) the projection data from CPU to GPU for the weight filter, I actually found two: 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for projections other than the first projection and runs during the first weight filter update, and the former one exists for all projections and is the one running during the only weight filter update for the first projection and the one taking action when the weight filter reruns during the ramp filter update for the remaining projections. (Note that I have a small modification in the GRAM message: when a gpu buffer is freed for a new allocation, I log it as "Deallocate" instead of "Freed" to discriminate it from a pure free operation.) ===Projection 0: >>>>>>>> Start Weight Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009700040 : 4805568 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009BA0040->0000002304AC0000 : 4805568 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : 00000023058C0000 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy 00000000039A5660->00000023058C0000 : 31112 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : 0000002306420000 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy 00000029FFC10040->0000002306420000 : 4290772992 --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 1: >>>>>>>> Start Weight Update 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : 0000002303F20000 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : 0000002303F20000 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : 0000002304180000 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304180000 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : 0000002304620000 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304620000 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 00000000094B0040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 0000000009950040->0000002305AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : 0000002305F60000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 00000000039B8470->0000002305F60000 : 31112 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : 0000002306060000 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 2: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 000000000AF50040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : 0000002304AC0000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002304AC0000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304F60000 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : 0000002306180000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A408080->0000002306180000 : 31112 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : 00000023058C0000 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< ===Projection 3: >>>>>>>> Start Weight Update 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy 000000000ABF0040->0000002303F20000 : 2418336 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy 0000000013400040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- End Weight Update <<<<<<<< >>>>>>>> Start Ramp Update 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy 0000002304620000->0000000009010040 : 4836672 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : 0000002305A00000 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy 00000000098E0040->0000002305A00000 : 4836672 --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : 0000002304AC0000 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy 000000000A414080->0000002305EA0000 : 31112 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : 0000002305FA0000 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 End Ramp Update <<<<<<<< >>>>>>>> Start BP Update --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- End BP Update <<<<<<<< Regards, Chao 2015-06-02 17:43 GMT+02:00 Simon Rit : > Hi Chao, > It looks bad but I couldn't reproduce the problem. What I did is add > messages in the GPUGenerateData and launch a very simple sequence of > command lines: > rtksimulatedgeometry -n 8 -o g > rtkprojectshepploganphantom -g g -o proj.mha > rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda > in which case I go only once in each GPUGenerateData. Can you give us > a command line example where you can see the problem? > Thanks, > Simon > > On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: > > Hi all, > > > > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter > seems > > to rerun unnecessarily. Details below: > > > > In FDKConeBeamReconstructionFilter > TFFTPrecision>::GenerateData() the three sub-filters run separately for > > timing: > > > > m_PreFilterProbe.Start(); > > m_WeightFilter->Update(); > > m_PreFilterProbe.Stop(); > > > > m_FilterProbe.Start(); > > m_RampFilter->Update(); > > m_FilterProbe.Stop(); > > > > m_BackProjectionProbe.Start(); > > m_BackProjectionFilter->Update(); > > m_BackProjectionProbe.Stop(); > > > > However with some debug procedure I found when executing > > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe there's > > something wrong with filter modified time or flags of CPU/GPU buffer? > > > > Furthermore, if I remove m_WeightFilter->Update() then both > m_WeightFilter > > and m_RampFilter will rerun during update of m_BackProjectionFilter. > Only if > > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and let > > m_BackProjectionFilter execute the whole minipipeline, all filters will > run > > nicely only once for each projection subset. > > > > The results are identical for all cases I tested. > > > > I did not check whether the same issue applies to the CPU or OpenCL > version. > > > > Regards, > > Chao > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.mason at ed.ac.uk Wed Jun 3 06:26:12 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Wed, 03 Jun 2015 11:26:12 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> Message-ID: <556ED644.4030205@ed.ac.uk> Hi Cyril, Many thanks for your reply. I will run a SART and corresponding CG reconstruction tonight for the artefact. I now have an "empirical implementation" of PICCS using the SART as you mentioned, and I will attempt to submit it to the toolbox if I find it successful. I was pointed towards your paper a while ago and was also surprised by the performance of PICCS methods for 4D. I will let you know if I find anything working stronger. Cheers, Jonathan On 02/06/15 19:21, Cyril Mory wrote: > Hi Jonathan, > > Please try to keep the discussions on RTK on the mailing list, so that > everyone can benefit from the questions and answers. > About the disk artifact you observe, could you try another iterative > algorithm, like for example SART (same parameters, only less > iterations, 4 is sufficient), and let us know whether the same > artifact is present in your results ? If the artifact is only present > in the CG result, then I'll have to take a deep dive into the CG code > and the way the weighting is performed. > > Regarding PICCS, many things come to my mind: > - it mostly depends on the algorithm you would like to use to minimize > the PICCS cost function. If you want to maximize re-use of available > RTK code, I recommend you adopt an alternating scheme : minimize the > data attachment term, then the TV of the volume, then the TV of the > difference between volume and prior, and repeat. You can do that with > the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the > other hand, you want a more theoretically solid minimization > algorithm, you will need more implementation work > - that being said, my personal experience with PICCS, on 4D C-arm CT > of the human heart, was disappointing. If you intend to use PICCS to > reconstruct either beating heart or free-breathing thorax data, I > would recommend you try rtkfourdrooster (and maybe read the paper that > compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography > using a 3D + time ROI reconstruction method with spatial and temporal > regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) > - if you do implement PICCS, it would be a valuable addition to RTK, > so I encourage you to submit it :) > > All the best, > Cyril > > On 2015-06-02 09:04, Jonathan Mason wrote: >> Hi Cyril, >> >> Thank you for your response. It indeed seems as though the artefact is >> due to the geometry mismatch, and I believe it originates from a >> calibration issue with the machine, so when I get access again I will >> try to fix this. You are also correct about my blurry reconstruction, >> and running for a decent number of iterations generates an image more >> comparable to FDK, though still with the disk present. In the mean time, >> I have been exploring more of the software package on some synthetic >> data. >> >> I would like to implement a PICCS like reconstruction by incorporating >> prior image regularisation. What would you recommend the best approach >> to this task. Would it be possible to realise it with an application >> calling RTK functions, or would I need to construct new templates for >> it? >> >> Many thanks, >> >> Jonathan >> On 07/05/15 15:25, mory wrote: >>> Hi Jonathan, >>> >>> Welcome to RTK ! >>> The artefact you see is indeed caused by the offset detector, but from >>> the documentation and the code, it seems that the "displaced detector >>> filter" should do its job in rtkconjugategradient, so I'm kind of >>> puzzled. >>> Your conjugate gradient reconstruction is very blurry. I guess you >>> used a very small number of iterations. Can you re-run it with 30 >>> iterations and see what happens ? >>> >>> Best regards, >>> Cyril >>> >>> On 2015-05-07 14:38, Simon Rit wrote: >>>> Hi, >>>> Probably an offset detector artefact. Look at this conversation: >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> [2] >>>> Maybe try one of the algorithms that properly uses the offset detector >>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>> I hope this helps, >>>> Simon >>>> >>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>> wrote: >>>> >>>>> Hello RTK users, >>>>> >>>>> I have been using RTK for a couple of weeks now, and really like >>>>> the >>>>> software. The extensive number of tools available is really >>>>> impressive >>>>> and helpful, so thanks! >>>>> >>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>> gradient reconstruction ? illustrated in the attached images >>>>> along with >>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>> data is a >>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>> suspected it was due to the specimen extending beyond the >>>>> reconstruction >>>>> volume, but extending this unfortunately did not help. Something >>>>> else I >>>>> have noticed is that the FOV filter isolates just this pale >>>>> cylindrical >>>>> artefact around the centre of rotation. >>>>> >>>>> Do you know of the cause of this effect, or how it could be >>>>> remedied? >>>>> >>>>> Best wishes, >>>>> >>>>> Jonathan >>>>> >>>>> -- >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>> >>>> >>>> >>>> Links: >>>> ------ >>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>> [2] >>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From j.mason at ed.ac.uk Thu Jun 4 04:28:25 2015 From: j.mason at ed.ac.uk (Jonathan Mason) Date: Thu, 04 Jun 2015 09:28:25 +0100 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <556ED644.4030205@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> Message-ID: <55700C29.4070509@ed.ac.uk> Good morning Cyril, I have attached results of reconstructions on the same data with FDK, SART and CG. The details of which are as follows: FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 SART --spacing 1.5 --dimension 384 -n 20 --positivity CG --spacing 1.5 --dimension 384 -n 30 The disk artefact does seem to reduce somewhat after a decent amount of iterations with CG, but the resulting image is still rather blurry, especially compared to the other methods. I hope this was insightful, and thanks for your help. Cheers, Jonathan On 03/06/15 11:26, Jonathan Mason wrote: > Hi Cyril, > > Many thanks for your reply. > > I will run a SART and corresponding CG reconstruction tonight for the > artefact. I now have an "empirical implementation" of PICCS using the > SART as you mentioned, and I will attempt to submit it to the toolbox if > I find it successful. > > I was pointed towards your paper a while ago and was also surprised by > the performance of PICCS methods for 4D. I will let you know if I find > anything working stronger. > > Cheers, > > Jonathan > On 02/06/15 19:21, Cyril Mory wrote: >> Hi Jonathan, >> >> Please try to keep the discussions on RTK on the mailing list, so that >> everyone can benefit from the questions and answers. >> About the disk artifact you observe, could you try another iterative >> algorithm, like for example SART (same parameters, only less >> iterations, 4 is sufficient), and let us know whether the same >> artifact is present in your results ? If the artifact is only present >> in the CG result, then I'll have to take a deep dive into the CG code >> and the way the weighting is performed. >> >> Regarding PICCS, many things come to my mind: >> - it mostly depends on the algorithm you would like to use to minimize >> the PICCS cost function. If you want to maximize re-use of available >> RTK code, I recommend you adopt an alternating scheme : minimize the >> data attachment term, then the TV of the volume, then the TV of the >> difference between volume and prior, and repeat. You can do that with >> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >> other hand, you want a more theoretically solid minimization >> algorithm, you will need more implementation work >> - that being said, my personal experience with PICCS, on 4D C-arm CT >> of the human heart, was disappointing. If you intend to use PICCS to >> reconstruct either beating heart or free-breathing thorax data, I >> would recommend you try rtkfourdrooster (and maybe read the paper that >> compares ROOSTER with PICCS, called "Cardiac C-arm computed tomography >> using a 3D + time ROI reconstruction method with spatial and temporal >> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >> - if you do implement PICCS, it would be a valuable addition to RTK, >> so I encourage you to submit it :) >> >> All the best, >> Cyril >> >> On 2015-06-02 09:04, Jonathan Mason wrote: >>> Hi Cyril, >>> >>> Thank you for your response. It indeed seems as though the artefact is >>> due to the geometry mismatch, and I believe it originates from a >>> calibration issue with the machine, so when I get access again I will >>> try to fix this. You are also correct about my blurry reconstruction, >>> and running for a decent number of iterations generates an image more >>> comparable to FDK, though still with the disk present. In the mean time, >>> I have been exploring more of the software package on some synthetic >>> data. >>> >>> I would like to implement a PICCS like reconstruction by incorporating >>> prior image regularisation. What would you recommend the best approach >>> to this task. Would it be possible to realise it with an application >>> calling RTK functions, or would I need to construct new templates for >>> it? >>> >>> Many thanks, >>> >>> Jonathan >>> On 07/05/15 15:25, mory wrote: >>>> Hi Jonathan, >>>> >>>> Welcome to RTK ! >>>> The artefact you see is indeed caused by the offset detector, but from >>>> the documentation and the code, it seems that the "displaced detector >>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>> puzzled. >>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>> used a very small number of iterations. Can you re-run it with 30 >>>> iterations and see what happens ? >>>> >>>> Best regards, >>>> Cyril >>>> >>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>> Hi, >>>>> Probably an offset detector artefact. Look at this conversation: >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> [2] >>>>> Maybe try one of the algorithms that properly uses the offset detector >>>>> filter? For the FOV, the option --displaced will provide the full FOV. >>>>> I hope this helps, >>>>> Simon >>>>> >>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>> wrote: >>>>> >>>>>> Hello RTK users, >>>>>> >>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>> the >>>>>> software. The extensive number of tools available is really >>>>>> impressive >>>>>> and helpful, so thanks! >>>>>> >>>>>> I have been experiencing an cylindrical artefact in using conjugate >>>>>> gradient reconstruction ? illustrated in the attached images >>>>>> along with >>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>> data is a >>>>>> scan of a thorax phantom from a Varian on-board imager. At first I >>>>>> suspected it was due to the specimen extending beyond the >>>>>> reconstruction >>>>>> volume, but extending this unfortunately did not help. Something >>>>>> else I >>>>>> have noticed is that the FOV filter isolates just this pale >>>>>> cylindrical >>>>>> artefact around the centre of rotation. >>>>>> >>>>>> Do you know of the cause of this effect, or how it could be >>>>>> remedied? >>>>>> >>>>>> Best wishes, >>>>>> >>>>>> Jonathan >>>>>> >>>>>> -- >>>>>> The University of Edinburgh is a charitable body, registered in >>>>>> Scotland, with registration number SC005336. >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>> >>>>> >>>>> Links: >>>>> ------ >>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>> [2] >>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >> -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_coronal.png Type: image/png Size: 15979 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cg_axial.png Type: image/png Size: 23555 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_coronal.png Type: image/png Size: 24088 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fdk_axial.png Type: image/png Size: 48245 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_coronal.png Type: image/png Size: 32715 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sart_axial.png Type: image/png Size: 60626 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Thu Jun 4 05:26:22 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 04 Jun 2015 05:26:22 -0400 Subject: [Rtk-users] Conjugate Gradient Artefact In-Reply-To: <55700C29.4070509@ed.ac.uk> References: <554B4F2A.9090706@ed.ac.uk> <04577c0234c3ec4351936d8cd23bd1ca@pop3.creatis.insa-lyon.fr> <556DA9D6.4070006@ed.ac.uk> <556ED644.4030205@ed.ac.uk> <55700C29.4070509@ed.ac.uk> Message-ID: Hi Jonathan, Thank you for your reply. All these reconstruction results seem normal to me. CG is well known to converge slower, but steadier, than SART. In SART, there is a command line option to set the number of projections per subset, ie the number of forward projections that are compared to the measured ones (and averaged together) between two updates of the volume. The default SART behavior is nprojspersubset=1, which results in very fast initial convergence, but sometimes leads to erratic behavior after a few iterations. Setting nprojspersubset to the total number of projections will get you a so-called SIRT reconstruction, which should have the same convergence properties as CG (because CG uses all the projections at each update). You can play with this parameter and observe the results. As you increase it towards the maximum, you should get slower but steadier convergence, until you reach SIRT, which looks like CG. Good to know that you managed to get a PICCS implementation quite quickly. Regards, Cyril On 2015-06-04 04:28, Jonathan Mason wrote: > Good morning Cyril, > > I have attached results of reconstructions on the same data with FDK, > SART and CG. The details of which are as follows: > > FDK --spacing 1.5 --dimension 384 --hann 0.5 --pad 1 > SART --spacing 1.5 --dimension 384 -n 20 --positivity > CG --spacing 1.5 --dimension 384 -n 30 > > The disk artefact does seem to reduce somewhat after a decent amount of > iterations with CG, but the resulting image is still rather blurry, > especially compared to the other methods. > > I hope this was insightful, and thanks for your help. > > Cheers, > > Jonathan > > On 03/06/15 11:26, Jonathan Mason wrote: >> Hi Cyril, >> >> Many thanks for your reply. >> >> I will run a SART and corresponding CG reconstruction tonight for the >> artefact. I now have an "empirical implementation" of PICCS using the >> SART as you mentioned, and I will attempt to submit it to the toolbox >> if >> I find it successful. >> >> I was pointed towards your paper a while ago and was also surprised by >> the performance of PICCS methods for 4D. I will let you know if I find >> anything working stronger. >> >> Cheers, >> >> Jonathan >> On 02/06/15 19:21, Cyril Mory wrote: >>> Hi Jonathan, >>> >>> Please try to keep the discussions on RTK on the mailing list, so >>> that >>> everyone can benefit from the questions and answers. >>> About the disk artifact you observe, could you try another iterative >>> algorithm, like for example SART (same parameters, only less >>> iterations, 4 is sufficient), and let us know whether the same >>> artifact is present in your results ? If the artifact is only present >>> in the CG result, then I'll have to take a deep dive into the CG code >>> and the way the weighting is performed. >>> >>> Regarding PICCS, many things come to my mind: >>> - it mostly depends on the algorithm you would like to use to >>> minimize >>> the PICCS cost function. If you want to maximize re-use of available >>> RTK code, I recommend you adopt an alternating scheme : minimize the >>> data attachment term, then the TV of the volume, then the TV of the >>> difference between volume and prior, and repeat. You can do that with >>> the SART filter and a TotalVariationDenoisingBPDQ filter. If, on the >>> other hand, you want a more theoretically solid minimization >>> algorithm, you will need more implementation work >>> - that being said, my personal experience with PICCS, on 4D C-arm CT >>> of the human heart, was disappointing. If you intend to use PICCS to >>> reconstruct either beating heart or free-breathing thorax data, I >>> would recommend you try rtkfourdrooster (and maybe read the paper >>> that >>> compares ROOSTER with PICCS, called "Cardiac C-arm computed >>> tomography >>> using a 3D + time ROI reconstruction method with spatial and temporal >>> regularization", http://www.ncbi.nlm.nih.gov/pubmed/24506624) >>> - if you do implement PICCS, it would be a valuable addition to RTK, >>> so I encourage you to submit it :) >>> >>> All the best, >>> Cyril >>> >>> On 2015-06-02 09:04, Jonathan Mason wrote: >>>> Hi Cyril, >>>> >>>> Thank you for your response. It indeed seems as though the artefact >>>> is >>>> due to the geometry mismatch, and I believe it originates from a >>>> calibration issue with the machine, so when I get access again I >>>> will >>>> try to fix this. You are also correct about my blurry >>>> reconstruction, >>>> and running for a decent number of iterations generates an image >>>> more >>>> comparable to FDK, though still with the disk present. In the mean >>>> time, >>>> I have been exploring more of the software package on some synthetic >>>> data. >>>> >>>> I would like to implement a PICCS like reconstruction by >>>> incorporating >>>> prior image regularisation. What would you recommend the best >>>> approach >>>> to this task. Would it be possible to realise it with an application >>>> calling RTK functions, or would I need to construct new templates >>>> for >>>> it? >>>> >>>> Many thanks, >>>> >>>> Jonathan >>>> On 07/05/15 15:25, mory wrote: >>>>> Hi Jonathan, >>>>> >>>>> Welcome to RTK ! >>>>> The artefact you see is indeed caused by the offset detector, but >>>>> from >>>>> the documentation and the code, it seems that the "displaced >>>>> detector >>>>> filter" should do its job in rtkconjugategradient, so I'm kind of >>>>> puzzled. >>>>> Your conjugate gradient reconstruction is very blurry. I guess you >>>>> used a very small number of iterations. Can you re-run it with 30 >>>>> iterations and see what happens ? >>>>> >>>>> Best regards, >>>>> Cyril >>>>> >>>>> On 2015-05-07 14:38, Simon Rit wrote: >>>>>> Hi, >>>>>> Probably an offset detector artefact. Look at this conversation: >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> [2] >>>>>> Maybe try one of the algorithms that properly uses the offset >>>>>> detector >>>>>> filter? For the FOV, the option --displaced will provide the full >>>>>> FOV. >>>>>> I hope this helps, >>>>>> Simon >>>>>> >>>>>> On Thu, May 7, 2015 at 1:40 PM, Jonathan Mason >>>>>> wrote: >>>>>> >>>>>>> Hello RTK users, >>>>>>> >>>>>>> I have been using RTK for a couple of weeks now, and really like >>>>>>> the >>>>>>> software. The extensive number of tools available is really >>>>>>> impressive >>>>>>> and helpful, so thanks! >>>>>>> >>>>>>> I have been experiencing an cylindrical artefact in using >>>>>>> conjugate >>>>>>> gradient reconstruction ? illustrated in the attached images >>>>>>> along with >>>>>>> FDK with no artefact ? of which I am unsure of its origin. The >>>>>>> data is a >>>>>>> scan of a thorax phantom from a Varian on-board imager. At first >>>>>>> I >>>>>>> suspected it was due to the specimen extending beyond the >>>>>>> reconstruction >>>>>>> volume, but extending this unfortunately did not help. Something >>>>>>> else I >>>>>>> have noticed is that the FOV filter isolates just this pale >>>>>>> cylindrical >>>>>>> artefact around the centre of rotation. >>>>>>> >>>>>>> Do you know of the cause of this effect, or how it could be >>>>>>> remedied? >>>>>>> >>>>>>> Best wishes, >>>>>>> >>>>>>> Jonathan >>>>>>> >>>>>>> -- >>>>>>> The University of Edinburgh is a charitable body, registered in >>>>>>> Scotland, with registration number SC005336. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users [1] >>>>>> >>>>>> >>>>>> Links: >>>>>> ------ >>>>>> [1] http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> [2] >>>>>> http://public.kitware.com/pipermail/rtk-users/2015-March/000713.html >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>> From ieee.safdary at gmail.com Sat Jun 6 09:18:31 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 17:48:31 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Sat Jun 6 09:28:40 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Sat, 6 Jun 2015 15:28:40 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <5572F588.60203@kitware.com> Hi Safdari, Can you send the full error log? Julien On 06/06/2015 15:18, safdary mohsen wrote: > Hi rtk-users > I do not have any error when i build rtk for CPU but when i build rtk > for gpu i get following error in visual studio 2012 (gpu: GTX 780): > > Error 4 error LNK1181: cannot open input file > '..\..\bin\Release\rtkcuda.lib' > > Regards, > Safdari > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From simon.rit at creatis.insa-lyon.fr Sat Jun 6 09:45:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 6 Jun 2015 15:45:47 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Hi Chao, Thanks for the detailed report. It was a tough bug but I think I nailed it: https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 This occured only in the displaced detector situation I think. Let me know if the fix does work for you. Thanks again, Simon On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > Hi Simon, > > I found how to reproduce it. > Instead of using proj.mha, if you use separate projection files (e.g. > proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The > --subsetsize is needed to show the issue (not necessarily =1 but should let > the for loop in the FDK filter run several times). The issue is not in the > first time the for loop runs, but only in sequential ones. > > Here's my output using separate tif files as projections: without -l it > runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is > normal, next ones weight filter run twice). > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda > --subsetsize 1 -l > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > CudaFDKWeightProjectionFilter::GPUGenerateData() > > When I print out the GRAM activities by #define VERBOSE in > itkCudaDataManager.h and add some other debug info in the code (before and > after filter->Update(), and at the beginning and end of GPUGenerateData() > of the filters) I have the following log showing the problem with -l flag > on (I show below the log of the first 4 projections and hope it is still > readable...) > When I focus on the CudaDataManager that updates (copies) the projection > data from CPU to GPU for the weight filter, I actually found two: > 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for > projections other than the first projection and runs during the first > weight filter update, and the former one exists for all projections and is > the one running during the only weight filter update for the first > projection and the one taking action when the weight filter reruns during > the ramp filter update for the remaining projections. > (Note that I have a small modification in the GRAM message: when a gpu > buffer is freed for a new allocation, I log it as "Deallocate" instead of > "Freed" to discriminate it from a pure free operation.) > > ===Projection 0: > > >>>>>>>> Start Weight Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009700040 : 4805568 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009BA0040->0000002304AC0000 : 4805568 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : > 00000023058C0000 > 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039A5660->00000023058C0000 : 31112 > 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : > 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 > 000000000391D390::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : > 0000002306420000 > 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy > 00000029FFC10040->0000002306420000 : 4290772992 > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 1: > > >>>>>>>> Start Weight Update > 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : > 0000002303F20000 > 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : > 0000002303F20000 > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304180000 > 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304180000 > 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : > 0000002304620000 > 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304620000 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 00000000094B0040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000384B170::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 0000000009950040->0000002305AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305F60000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 00000000039B8470->0000002305F60000 : 31112 > 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : > 0000002306060000 > 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 > 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 2: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 000000000AF50040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002304AC0000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002304AC0000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304F60000 > 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : > 0000002306180000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A408080->0000002306180000 : 31112 > 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : > 00000023058C0000 > 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : 0000002306060000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 > 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : 0000002304F60000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > ===Projection 3: > > >>>>>>>> Start Weight Update > 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy > 000000000ABF0040->0000002303F20000 : 2418336 > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D020::Freed GPU buffer of size 4836672 Bytes : 0000002304AC0000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy > 0000000013400040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > End Weight Update <<<<<<<< > > >>>>>>>> Start Ramp Update > 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy > 0000002304620000->0000000009010040 : 4836672 > 000000000391D110::Freed GPU buffer of size 4836672 Bytes : 0000002305A00000 > --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- > 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : > 0000002305A00000 > 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy > 00000000098E0040->0000002305A00000 : 4836672 > --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- > --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : > 0000002304AC0000 > 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : > 0000002305EA0000 > 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy > 000000000A414080->0000002305EA0000 : 31112 > 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : > 0000002305FA0000 > 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : 00000023058C0000 > --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- > 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 > 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : 0000002304AC0000 > End Ramp Update <<<<<<<< > > >>>>>>>> Start BP Update > --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- > --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- > End BP Update <<<<<<<< > > > Regards, > Chao > > > 2015-06-02 17:43 GMT+02:00 Simon Rit : > >> Hi Chao, >> It looks bad but I couldn't reproduce the problem. What I did is add >> messages in the GPUGenerateData and launch a very simple sequence of >> command lines: >> rtksimulatedgeometry -n 8 -o g >> rtkprojectshepploganphantom -g g -o proj.mha >> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >> in which case I go only once in each GPUGenerateData. Can you give us >> a command line example where you can see the problem? >> Thanks, >> Simon >> >> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >> > Hi all, >> > >> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >> seems >> > to rerun unnecessarily. Details below: >> > >> > In FDKConeBeamReconstructionFilter> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >> > timing: >> > >> > m_PreFilterProbe.Start(); >> > m_WeightFilter->Update(); >> > m_PreFilterProbe.Stop(); >> > >> > m_FilterProbe.Start(); >> > m_RampFilter->Update(); >> > m_FilterProbe.Stop(); >> > >> > m_BackProjectionProbe.Start(); >> > m_BackProjectionFilter->Update(); >> > m_BackProjectionProbe.Stop(); >> > >> > However with some debug procedure I found when executing >> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >> there's >> > something wrong with filter modified time or flags of CPU/GPU buffer? >> > >> > Furthermore, if I remove m_WeightFilter->Update() then both >> m_WeightFilter >> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >> Only if >> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >> let >> > m_BackProjectionFilter execute the whole minipipeline, all filters will >> run >> > nicely only once for each projection subset. >> > >> > The results are identical for all cases I tested. >> > >> > I did not check whether the same issue applies to the CPU or OpenCL >> version. >> > >> > Regards, >> > Chao >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Sat Jun 6 10:35:21 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Sat, 6 Jun 2015 19:05:21 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\ applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\ rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda. lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Jun 8 13:17:22 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 8 Jun 2015 13:17:22 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> Hi Safdari, It seems that CUDA path was not properly specified with your project. How does the cmake look like? For example, I?m attaching a CMake screen shot for my successfully built rtk. Yang From: Rtk-users [mailto:rtk-users-bounces at public.kitware.com] On Behalf Of safdary mohsen Sent: Saturday, June 06, 2015 10:35 AM To: Rtk-users at public.kitware.com Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi rtk-users I do not have any error when i build rtk for CPU but when i build rtk for gpu i get following error in visual studio 2012 (gpu: GTX 780): Warning 1 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 2 warning D9025: overriding '/W1' with '/w' D:\RTK\build\applications\gengetopt\cl Warning 9 warning C4305: '=' : truncation from 'double' to 'float' D:\RTK\build\applications\rtkadmmtotalvariation\rtkadmmtotalvariation_ggo.c 154 Error 3 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 Error 7 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 8 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 10 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 13 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 14 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 15 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 18 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 20 error LNK1181: cannot open input file '..\bin\Release\rtkcuda.lib' D:\RTK\build\Testing\LINK Error 4 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkbackprojections\LINK Error 5 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\FirstReconstruction\LINK Error 6 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\examples\HelloWorld\LINK Error 11 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkadmmtotalvariation\LINK Error 12 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkconjugategradient\LINK Error 16 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkfdk\LINK Error 17 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkinlinefdk\LINK Error 19 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtkramp\LINK Error 21 error LNK1181: cannot open input file '..\..\bin\Release\rtkcuda.lib' D:\RTK\build\applications\rtksart\LINK Regards, Safdari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSetting.PNG Type: image/png Size: 60842 bytes Desc: not available URL: From wuchao04 at gmail.com Tue Jun 9 04:27:10 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 9 Jun 2015 10:27:10 +0200 Subject: [Rtk-users] rtkfdk: CudaFDKWeightProjectionFilter runs twice In-Reply-To: References: Message-ID: Thanks Simon, so far the program runs without any problem. Regards, Chao 2015-06-06 15:45 GMT+02:00 Simon Rit : > Hi Chao, > Thanks for the detailed report. It was a tough bug but I think I nailed it: > > https://github.com/SimonRit/RTK/commit/9ff302899f247c10b8ab198df7b2d1aac6bbcad8 > This occured only in the displaced detector situation I think. Let me know > if the fix does work for you. Thanks again, > Simon > > On Tue, Jun 2, 2015 at 11:08 PM, Chao Wu wrote: > >> Hi Simon, >> >> I found how to reproduce it. >> Instead of using proj.mha, if you use separate projection files (e.g. >> proj_0.tif ~ proj_7.tif), and add the -l flag you will see the problem. The >> --subsetsize is needed to show the issue (not necessarily =1 but should let >> the for loop in the FDK filter run several times). The issue is not in the >> first time the for loop runs, but only in sequential ones. >> >> Here's my output using separate tif files as projections: without -l it >> runs 8 times, with -l it runs 15 times = 1 + 7*2 (first time in the loop is >> normal, next ones weight filter run twice). >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> D:\Chao\RTK>rtkfdk -p . -r proj_ -o fdk.mha -g g --hardware cuda >> --subsetsize 1 -l >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> CudaFDKWeightProjectionFilter::GPUGenerateData() >> >> When I print out the GRAM activities by #define VERBOSE in >> itkCudaDataManager.h and add some other debug info in the code (before and >> after filter->Update(), and at the beginning and end of GPUGenerateData() >> of the filters) I have the following log showing the problem with -l flag >> on (I show below the log of the first 4 projections and hope it is still >> readable...) >> When I focus on the CudaDataManager that updates (copies) the projection >> data from CPU to GPU for the weight filter, I actually found two: >> 00000000036B7CC0 and 00000000036B80C0. The latter one only exists for >> projections other than the first projection and runs during the first >> weight filter update, and the former one exists for all projections and is >> the one running during the only weight filter update for the first >> projection and the one taking action when the weight filter reruns during >> the ramp filter update for the remaining projections. >> (Note that I have a small modification in the GRAM message: when a gpu >> buffer is freed for a new allocation, I log it as "Deallocate" instead of >> "Freed" to discriminate it from a pure free operation.) >> >> ===Projection 0: >> >> >>>>>>>> Start Weight Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009700040 : 4805568 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B3F0::Allocate Create GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009BA0040->0000002304AC0000 : 4805568 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391D390::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 000000000391C800::Allocate Create GPU buffer of size 31112 Bytes : >> 00000023058C0000 >> 00000000036B85C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039A5660->00000023058C0000 : 31112 >> 00000000038B3A40::Allocate Create GPU buffer of size 846660 Bytes : >> 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 000000000391C800::Freed GPU buffer of size 31112 Bytes : 00000023058C0000 >> 000000000391D390::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> 0000000003832A80::Allocate Create GPU buffer of size 4290772992 Bytes : >> 0000002306420000 >> 00000000036B79C0::UpdateGPUBuffer CPU->GPU data copy >> 00000029FFC10040->0000002306420000 : 4290772992 >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 1: >> >> >>>>>>>> Start Weight Update >> 000000000380B570::Deallocate GPU buffer of size 2402784 Bytes : >> 0000002303F20000 >> 000000000380B570::Allocate Create GPU buffer of size 2418336 Bytes : >> 0000002303F20000 >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 0000000003832530::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304180000 >> 0000000003832530::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304180000 >> 0000000003832800::Deallocate GPU buffer of size 4805568 Bytes : >> 0000002304620000 >> 0000000003832800::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304620000 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B3F0::Freed GPU buffer of size 4805568 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000384B170::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000094B0040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000384B170::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 0000000009950040->0000002305AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039BFED0::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C01A0::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305F60000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 00000000039B8470->0000002305F60000 : 31112 >> 00000000039C02E0::Allocate Create GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> 00000000038B3A40::Freed GPU buffer of size 846660 Bytes : 00000023059C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C01A0::Freed GPU buffer of size 31112 Bytes : 0000002305F60000 >> 00000000039BFED0::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 2: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391CBC0::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000AF50040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391CBC0::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D020::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002304AC0000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> 00000000039C0100::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002306180000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A408080->0000002306180000 : 31112 >> 00000000039C0060::Allocate Create GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> 00000000039C02E0::Freed GPU buffer of size 1097208 Bytes : >> 0000002306060000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0100::Freed GPU buffer of size 31112 Bytes : 0000002306180000 >> 00000000039C0420::Freed GPU buffer of size 9704448 Bytes : >> 0000002304F60000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> ===Projection 3: >> >> >>>>>>>> Start Weight Update >> 00000000036B75C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000ABF0040->0000002303F20000 : 2418336 >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D020::Freed GPU buffer of size 4836672 Bytes : >> 0000002304AC0000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 000000000391D110::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B80C0::UpdateGPUBuffer CPU->GPU data copy >> 0000000013400040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> End Weight Update <<<<<<<< >> >> >>>>>>>> Start Ramp Update >> 00000000036B78C0::UpdateCPUBuffer GPU->CPU data copy >> 0000002304620000->0000000009010040 : 4836672 >> 000000000391D110::Freed GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> --------VVVVVVVV CudaFDKWeightProjectionFilter GenerateData-------- >> 00000000039C0420::Allocate Create GPU buffer of size 4836672 Bytes : >> 0000002305A00000 >> 00000000036B7CC0::UpdateGPUBuffer CPU->GPU data copy >> 00000000098E0040->0000002305A00000 : 4836672 >> --------^^^^^^^^ CudaFDKWeightProjectionFilter GenerateData-------- >> --------VVVVVVVV CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0380::Allocate Create GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> 00000000039C0290::Allocate Create GPU buffer of size 31112 Bytes : >> 0000002305EA0000 >> 00000000036B81C0::UpdateGPUBuffer CPU->GPU data copy >> 000000000A414080->0000002305EA0000 : 31112 >> 00000000039C0560::Allocate Create GPU buffer of size 1081036 Bytes : >> 0000002305FA0000 >> 00000000039C0060::Freed GPU buffer of size 1183044 Bytes : >> 00000023058C0000 >> --------^^^^^^^^ CudaFFTConvolutionImageFilter GenerateData-------- >> 00000000039C0290::Freed GPU buffer of size 31112 Bytes : 0000002305EA0000 >> 00000000039C0380::Freed GPU buffer of size 9704448 Bytes : >> 0000002304AC0000 >> End Ramp Update <<<<<<<< >> >> >>>>>>>> Start BP Update >> --------VVVVVVVV CudaFDKBackProjectionImageFilter GenerateData-------- >> --------^^^^^^^^ CudaFDKBackProjectionImageFilter GenerateData-------- >> End BP Update <<<<<<<< >> >> >> Regards, >> Chao >> >> >> 2015-06-02 17:43 GMT+02:00 Simon Rit : >> >>> Hi Chao, >>> It looks bad but I couldn't reproduce the problem. What I did is add >>> messages in the GPUGenerateData and launch a very simple sequence of >>> command lines: >>> rtksimulatedgeometry -n 8 -o g >>> rtkprojectshepploganphantom -g g -o proj.mha >>> rtkfdk -p . -r proj.mha -o fdk.mha -g g --hardware cuda >>> in which case I go only once in each GPUGenerateData. Can you give us >>> a command line example where you can see the problem? >>> Thanks, >>> Simon >>> >>> On Mon, Jun 1, 2015 at 6:53 PM, Chao Wu wrote: >>> > Hi all, >>> > >>> > When testing CUDA-based FDK I found the CudaFDKWeightProjectionFilter >>> seems >>> > to rerun unnecessarily. Details below: >>> > >>> > In FDKConeBeamReconstructionFilter>> > TFFTPrecision>::GenerateData() the three sub-filters run separately for >>> > timing: >>> > >>> > m_PreFilterProbe.Start(); >>> > m_WeightFilter->Update(); >>> > m_PreFilterProbe.Stop(); >>> > >>> > m_FilterProbe.Start(); >>> > m_RampFilter->Update(); >>> > m_FilterProbe.Stop(); >>> > >>> > m_BackProjectionProbe.Start(); >>> > m_BackProjectionFilter->Update(); >>> > m_BackProjectionProbe.Stop(); >>> > >>> > However with some debug procedure I found when executing >>> > m_RampFilter->Update() the m_WeightFilter is updated again. Maybe >>> there's >>> > something wrong with filter modified time or flags of CPU/GPU buffer? >>> > >>> > Furthermore, if I remove m_WeightFilter->Update() then both >>> m_WeightFilter >>> > and m_RampFilter will rerun during update of m_BackProjectionFilter. >>> Only if >>> > I remove both m_WeightFilter->Update() and m_RampFilter->Update() and >>> let >>> > m_BackProjectionFilter execute the whole minipipeline, all filters >>> will run >>> > nicely only once for each projection subset. >>> > >>> > The results are identical for all cases I tested. >>> > >>> > I did not check whether the same issue applies to the CPU or OpenCL >>> version. >>> > >>> > Regards, >>> > Chao >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at public.kitware.com >>> > http://public.kitware.com/mailman/listinfo/rtk-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 04:12:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 10:12:25 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT Message-ID: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From padraig.looney at gmail.com Wed Jun 10 07:35:20 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Wed, 10 Jun 2015 12:35:20 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction Message-ID: Dear All, In my group we have been using RTK for digital breast tomosynthesis. We have successfully used the back projection FDK algorithms to reconstruct our stack of planes. I have been trying to use the SART filter instead to compare. The geometry has remained the same as for the case of the back projection but I now get an ITK error at runtime itk::ERROR: Cannot account for detector displacement larger than 50% of panel size. Corner inf=-0 and corner sup=-163.422 Any help would be appreciated. Thanks P?draig -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 07:40:02 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 13:40:02 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, Can you send the mhd header and the geometry file to reproduce the bug? You don't have to send the data, we should be able to simulate it. Thanks, Simon On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney wrote: > Dear All, > > > In my group we have been using RTK for digital breast tomosynthesis. We > have successfully used the back projection FDK algorithms to reconstruct > our stack of planes. I have been trying to use the SART filter instead to > compare. The geometry has remained the same as for the case of the back > projection but I now get an ITK error at runtime > > itk::ERROR: Cannot account for detector displacement larger than 50% of > panel size. Corner inf=-0 and corner sup=-163.422 > > Any help would be appreciated. > > Thanks > P?draig > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Wed Jun 10 08:00:05 2015 From: gdhugo at vcu.edu (Geoff Hugo) Date: Wed, 10 Jun 2015 08:00:05 -0400 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ghostcz at hotmail.com Wed Jun 10 09:30:21 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 10 Jun 2015 15:30:21 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Simon, Great idea. Will be there. Best regards, Louie From: Geoff Hugo Sent: Wednesday, June 10, 2015 2:00 PM To: rtk-users at public.kitware.com Subject: Re: [Rtk-users] RTK user meeting on image quality in static CBCT Hi Simon, Great idea, thanks for organizing. Will there be an online option for those of us unable to be there in person? Thanks, Geoff ------------------------------------ Geoffrey D. Hugo, Ph.D. Associate Professor, Radiation Oncology Director, Medical Physics Graduate Program Virginia Commonwealth University (804) 628 3457 On Jun 10, 2015, at 4:12 AM, Simon Rit wrote: Dear RTK users and developers, We are a few users to face the same problem of poor image quality in cone-beam CT due to photon statistics, detector effects (lag, glare, ...), beam hardening and/or scatter. RTK has basic solutions, there are other solutions being implemented and we would like better solutions implemented. I would like to invite those that want to contribute to this topic to a one-day meeting in Lyon the last week of July. Goals: - present and discuss existing RTK solutions, - present and discuss solutions being implemented in RTK, - propose the development of new solutions and share the work. Place: Lyon, France (exact location to be announced) Time: last week of July, day to be determined, please complete foodle if you're interested. Cost: free but you'll have to organize your travel and hotel plans (I'll send suggestions later). If there is a specific algorithm that you would like to discuss, please send me an email with the reference. I will put together a list of references to read before the meeting. I hope to see you all at the end of July. Simon _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------------------------------------------------------------------------- _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 10 10:28:44 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 10 Jun 2015 16:28:44 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi Geoff, We would prefer a face-to-face meeting because it's easier for discussing and a few people in the consortium have already agreed to travel from other european countries. However, I understand that Virginia is a bit far away... I will try to provide an online option but the priority will be given to face-to-face discussions. I'll keep you posted on videoconference options when we have set a date and a venue. In any case, I'll try to report the conclusions of the meeting to the community. Simon On Wed, Jun 10, 2015 at 2:00 PM, Geoff Hugo wrote: > Hi Simon, > > Great idea, thanks for organizing. Will there be an online option for those > of us unable to be there in person? > > Thanks, > Geoff > > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Associate Professor, Radiation Oncology > Director, Medical Physics Graduate Program > Virginia Commonwealth University > (804) 628 3457 > > > On Jun 10, 2015, at 4:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From guangming.zang at kaust.edu.sa Wed Jun 10 17:08:56 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 00:08:56 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: ?H?i chao, Thanks very much for the prompt reply. i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i run algorithm like basic SART or FDK, are they related to GPU or GRAM?? Yes, i tried it by GPU as well, i mean, when use SART algorithm, besides some basic Multi threads algorithms in -f and -b, i also tried the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, respectively, and only to find that nothing in the reconstructed volume (the slices are all black) in this GPU version . I tried in other simulated data in the RTKwiki, the Cuda version still does not work. For SART with Cuda ,the time elapsed is shown in attached file. and i remember when i configure RTK in my computer, i allow the Cuda option. So what is the problem could be?? Sorry for the long letter and thanks very much, like always Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-10 17:06 GMT+03:00 Chao Wu : > Hi Guangming, > > Did you also use GPU? Is there sufficient GRAM? > > Regards, Chao > > 2015-06-10 15:39 GMT+02:00 Guangming Zang : > >> Hi RTK community, >> After i used FDK, SART, and ADMM to reconstruct several slices and >> visualize them, i think the geometry settings are correct from the scanner >> and the RTK. >> However, when i want to reconstruct the whole volume(i.e., size of >> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >> working immediately. But when i changed it to only reconstruct half of the >> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >> with an error displays). My machine's memory size is over 50 GB.. and when >> i ran these scanned data on my own application to reconstruct a whole >> volume, it works fine as well. >> So can you help me to figure it out? >> >> Regards >> Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CudaSART.jpg Type: image/jpeg Size: 31795 bytes Desc: not available URL: From guangming.zang at kaust.edu.sa Wed Jun 10 20:14:42 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 11 Jun 2015 03:14:42 +0300 Subject: [Rtk-users] Can not reconstruct a volume with size of 1743*998*1761 ??? In-Reply-To: References: Message-ID: Well....i do not know how to explain, but after restarting my computer, it works now for FDK at least. After FDK, i will try other algorithm, which i think will work as well. Thanks for your kind help. Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-11 0:08 GMT+03:00 Guangming Zang : > ?H?i chao, > Thanks very much for the prompt reply. > i am sorry but it mean "GPU RAM" when you say GRAM?? if yes, then it is > 2 GB or 4GB(i need check when in lab tomorrow). But i was wondering when i > run algorithm like basic SART or FDK, are they related to GPU or GRAM?? > Yes, i tried it by GPU as well, i mean, when use SART algorithm, > besides some basic Multi threads algorithms in -f and -b, i also tried > the forewardprojection and backprojection as CudaRayCast, CudaVoxelBased, > respectively, and only to find that nothing in the reconstructed volume > (the slices are all black) in this GPU version . I tried in other simulated > data in the RTKwiki, the Cuda version still does not work. For SART with > Cuda ,the time elapsed is shown in attached file. and i remember when i > configure RTK in my computer, i allow the Cuda option. > So what is the problem could be?? > > Sorry for the long letter and thanks very much, like always > Regards > Guangming > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-10 17:06 GMT+03:00 Chao Wu : > >> Hi Guangming, >> >> Did you also use GPU? Is there sufficient GRAM? >> >> Regards, Chao >> >> 2015-06-10 15:39 GMT+02:00 Guangming Zang : >> >>> Hi RTK community, >>> After i used FDK, SART, and ADMM to reconstruct several slices and >>> visualize them, i think the geometry settings are correct from the scanner >>> and the RTK. >>> However, when i want to reconstruct the whole volume(i.e., size of >>> 1743*998*1761) by using any of FDK, SART, ADMM , the applications stopped >>> working immediately. But when i changed it to only reconstruct half of the >>> volume(i.e., 800*988*1761) it seems to be working fine(at least no pop up >>> with an error displays). My machine's memory size is over 50 GB.. and when >>> i ran these scanned data on my own application to reconstruct a whole >>> volume, it works fine as well. >>> So can you help me to figure it out? >>> >>> Regards >>> Guangming >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:12:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:12:33 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Hi, I have received your data and run the attached test. I also get the error "Description: itk::ERROR: Cannot account for too large detector displacements, a part of space must be covered by all projections." wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that it worked for FDK but it doesn't work for me... Given your geometry, this is the expected behavior. If you still want to try the iterative reconstruction, you'll have to shunt the displaced detector filter in the pipelines using the documentation, see for example this image for sart. Simon PS: maybe we will consider changing the error to a simple warning and doing nothing in such cases, I'll discuss it with the local iterative pope On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit wrote: > Hi, > Can you send the mhd header and the geometry file to reproduce the bug? > You don't have to send the data, we should be able to simulate it. > Thanks, > Simon > > On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > wrote: > >> Dear All, >> >> >> In my group we have been using RTK for digital breast tomosynthesis. We >> have successfully used the back projection FDK algorithms to reconstruct >> our stack of planes. I have been trying to use the SART filter instead to >> compare. The geometry has remained the same as for the case of the back >> projection but I now get an ITK error at runtime >> >> itk::ERROR: Cannot account for detector displacement larger than 50% of >> panel size. Corner inf=-0 and corner sup=-163.422 >> >> Any help would be appreciated. >> >> Thanks >> P?draig >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DBTGeom.xml Type: text/xml Size: 9402 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.mhd Type: application/octet-stream Size: 350 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sh Type: application/x-sh Size: 182 bytes Desc: not available URL: From padraig.looney at gmail.com Thu Jun 11 09:22:53 2015 From: padraig.looney at gmail.com (Padraig Looney) Date: Thu, 11 Jun 2015 14:22:53 +0100 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Thanks for looking into this. Yes. We can use the back projection filters fine. Although, we have yet to modify the ramp filters to suit our usecase. On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit wrote: > Hi, > I have received your data and run the attached test. I also get the error > "Description: itk::ERROR: Cannot account for too large detector > displacements, a part of space must be covered by all projections." > wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested that > it worked for FDK but it doesn't work for me... > Given your geometry, this is the expected behavior. If you still want to > try the iterative reconstruction, you'll have to shunt the displaced > detector filter in the pipelines using the documentation, see for example this > image for > sart. > Simon > > PS: maybe we will consider changing the error to a simple warning and > doing nothing in such cases, I'll discuss it with the local iterative pope > > On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit > wrote: > >> Hi, >> Can you send the mhd header and the geometry file to reproduce the bug? >> You don't have to send the data, we should be able to simulate it. >> Thanks, >> Simon >> >> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney > > wrote: >> >>> Dear All, >>> >>> >>> In my group we have been using RTK for digital breast tomosynthesis. We >>> have successfully used the back projection FDK algorithms to reconstruct >>> our stack of planes. I have been trying to use the SART filter instead to >>> compare. The geometry has remained the same as for the case of the back >>> projection but I now get an ITK error at runtime >>> >>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>> panel size. Corner inf=-0 and corner sup=-163.422 >>> >>> Any help would be appreciated. >>> >>> Thanks >>> P?draig >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:43:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:43:42 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Can you explain why I get an error that you don't get? Did you write your own c++ software or did you use rtkfdk? I think it would be interesting for everyone if you could share this. Thanks, Simon On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney wrote: > Thanks for looking into this. > > Yes. We can use the back projection filters fine. Although, we have yet to > modify the ramp filters to suit our usecase. > > > > On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit > wrote: > >> Hi, >> I have received your data and run the attached test. I also get the error >> "Description: itk::ERROR: Cannot account for too large detector >> displacements, a part of space must be covered by all projections." >> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >> that it worked for FDK but it doesn't work for me... >> Given your geometry, this is the expected behavior. If you still want to >> try the iterative reconstruction, you'll have to shunt the displaced >> detector filter in the pipelines using the documentation, see for example this >> image for >> sart. >> Simon >> >> PS: maybe we will consider changing the error to a simple warning and >> doing nothing in such cases, I'll discuss it with the local iterative pope >> >> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> Can you send the mhd header and the geometry file to reproduce the bug? >>> You don't have to send the data, we should be able to simulate it. >>> Thanks, >>> Simon >>> >>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>> padraig.looney at gmail.com> wrote: >>> >>>> Dear All, >>>> >>>> >>>> In my group we have been using RTK for digital breast tomosynthesis. We >>>> have successfully used the back projection FDK algorithms to reconstruct >>>> our stack of planes. I have been trying to use the SART filter instead to >>>> compare. The geometry has remained the same as for the case of the back >>>> projection but I now get an ITK error at runtime >>>> >>>> itk::ERROR: Cannot account for detector displacement larger than 50% of >>>> panel size. Corner inf=-0 and corner sup=-163.422 >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> P?draig >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 09:55:36 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 15:55:36 +0200 Subject: [Rtk-users] Digital Breast Tomosynthesis - Iterative reconstruction In-Reply-To: References: Message-ID: Please answer to the mailing list. This makes sense then, by doing your own code you did not include the displaced detector filter. You have to shunt it in the iterative algorithms if you want to do the same. Thanks for sharing and we'll let you know if we implement something that could fix your issue. Simon On Thu, Jun 11, 2015 at 3:46 PM, Padraig Looney wrote: > I've not used rtkfdk. The code for the back projection that works for me > is > > typedef rtk::ProjectionGeometry<3> ProjectionGeometry; > ProjectionGeometry::Pointer baseGeom = geometry.GetPointer(); > typedef rtk::BackProjectionImageFilter< FloatImageType > ,FloatImageType> FDKCPUType; > FDKCPUType::Pointer feldkamp = FDKCPUType::New(); > feldkamp->SetInput( 0, constantImageSource->GetOutput() ); > feldkamp->SetInput( 1, projectionStack); > feldkamp->SetGeometry( baseGeom ); > feldkamp->Update(); > > We did the same with the rtk::FDKConeBeamReconstructionFilter but as I > mention we have to adapt the ramp filter. > > On Thu, Jun 11, 2015 at 2:43 PM, Simon Rit > wrote: > >> Can you explain why I get an error that you don't get? Did you write your >> own c++ software or did you use rtkfdk? >> I think it would be interesting for everyone if you could share this. >> Thanks, >> Simon >> >> On Thu, Jun 11, 2015 at 3:22 PM, Padraig Looney > > wrote: >> >>> Thanks for looking into this. >>> >>> Yes. We can use the back projection filters fine. Although, we have yet >>> to modify the ramp filters to suit our usecase. >>> >>> >>> >>> On Thu, Jun 11, 2015 at 2:12 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Hi, >>>> I have received your data and run the attached test. I also get the >>>> error >>>> "Description: itk::ERROR: Cannot account for too large detector >>>> displacements, a part of space must be covered by all projections." >>>> wtih rtkfdk. Did you use rtkfdk for testing FDK? Your email suggested >>>> that it worked for FDK but it doesn't work for me... >>>> Given your geometry, this is the expected behavior. If you still want >>>> to try the iterative reconstruction, you'll have to shunt the displaced >>>> detector filter in the pipelines using the documentation, see for example this >>>> image for >>>> sart. >>>> Simon >>>> >>>> PS: maybe we will consider changing the error to a simple warning and >>>> doing nothing in such cases, I'll discuss it with the local iterative pope >>>> >>>> On Wed, Jun 10, 2015 at 1:40 PM, Simon Rit < >>>> simon.rit at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi, >>>>> Can you send the mhd header and the geometry file to reproduce the >>>>> bug? You don't have to send the data, we should be able to simulate it. >>>>> Thanks, >>>>> Simon >>>>> >>>>> On Wed, Jun 10, 2015 at 1:35 PM, Padraig Looney < >>>>> padraig.looney at gmail.com> wrote: >>>>> >>>>>> Dear All, >>>>>> >>>>>> >>>>>> In my group we have been using RTK for digital breast tomosynthesis. >>>>>> We have successfully used the back projection FDK algorithms to reconstruct >>>>>> our stack of planes. I have been trying to use the SART filter instead to >>>>>> compare. The geometry has remained the same as for the case of the back >>>>>> projection but I now get an ITK error at runtime >>>>>> >>>>>> itk::ERROR: Cannot account for detector displacement larger than 50% >>>>>> of panel size. Corner inf=-0 and corner sup=-163.422 >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> P?draig >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 13:06:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 19:06:27 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader Message-ID: Hi all, Maybe a stupid question... what is the purpose of the streaming filter at the end of the mini-filter pipeline inside the ProjectionsReader? Thanks. Regards, Chao -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 13:19:57 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 19:19:57 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Not stupid at all. We have recently introduced the possibility to automatically compute the I0 (pixel value without object). This is the filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in doc . In many scanners, the exposure varies from frame-to-frame and we wanted this to be projection-specific which is why we did this. We also think that all the preprocessing is more efficient per projection but this is pure conjecture. There were only pros in our opinion but do you see cons to this solution? Simon On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > Hi all, > > Maybe a stupid question... what is the purpose of the streaming filter at > the end of the mini-filter pipeline inside the ProjectionsReader? > Thanks. > > Regards, Chao > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 16:52:20 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 22:52:20 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Thanks Simon, it is clear. I have an issue with rtkfdk. When using cuda, the first several (mini-) filters in rtkfdk look like this: file reader -> preprocessing filters -> streaming filter -> cuda displaced detector filter -> ... When the streaming filter is updated, all preprocessed projection data will be store in RAM, which is not a problem so far. However when executing the cuda displaced detector filter, RAM to GRAM copy will be triggered. In my case the GRAM is not big enough to store the data. I know --lowmem will work but when it combines with --division the projection files will be re-read several times from harddisk, which is quite inefficient and slow. My previous temporary solution is to use the streaming filter as a sort of isolator: Instead of updating the streaming filter in the first step, I only update the last preprocessing filter. This way, when updating the remaining part of the pipeline, the buffered region of the input of the streaming filter will be the full stack of projections, but the buffered region of the output of the streaming filter will just be the requested region by the cuda displaced detector filter (#subsetsize projections). Then there is no problem to copy this small amount of projections from RAM to GRAM during execution of the cuda displaced detector filter. Nevertheless looking at your explanations about the purpose of the streaming filter, I found this is not an optimal solution. Now I am thinking to add a simple filter between the streaming filter and the cuda displace detector filter for isolation, so that its input will buffer the full stack of projections after updating the streaming filter, but its output only buffers the requested region (#subsetsize projections). How do you think about this solution? Any better opinions? Regards, Chao 2015-06-11 19:19 GMT+02:00 Simon Rit : > Not stupid at all. We have recently introduced the possibility to > automatically compute the I0 (pixel value without object). This is the > filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in > doc . > In many scanners, the exposure varies from frame-to-frame and we wanted > this to be projection-specific which is why we did this. We also think that > all the preprocessing is more efficient per projection but this is pure > conjecture. > There were only pros in our opinion but do you see cons to this solution? > Simon > > On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: > >> Hi all, >> >> Maybe a stupid question... what is the purpose of the streaming filter at >> the end of the mini-filter pipeline inside the ProjectionsReader? >> Thanks. >> >> Regards, Chao >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:31:32 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:31:32 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Interesting problem. First a comment: normally with mhd files, it only reads from disk what is requested, not the whole projection. I have implemented FDK so that it only request the lines that are necessary for the piece of the volume that is being computed. However, the full projection is read with some input formats that did not implement streaming or if you use the --hannY option or the scatter glare correction. Another comment that crosses my mind: once it's been read from disk once, if you have enough ram, it will be cached and the second time it reads it should be much faster, as if it were in RAM. For your solution, I would say that it's already what it does. The reader, the preprocessing and the streaming are encapsulated in the rtk::ProjectionsReader so if you request the full stack from the projections reader, i.e., without the --lowmem option, it will compute the whole stack but it will do it one projection at a time since there is a streaming filter encapsulated. Is this not what you observe? Projections will still be loaded substack per substack to the gpu after since there is an extract filter in FDK. In short, don't use the --lowmem option and you should be set. If not, let me know because there is something I'm missing or not working. Simon On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > Thanks Simon, it is clear. > > I have an issue with rtkfdk. When using cuda, the first several (mini-) > filters in rtkfdk look like this: > file reader -> preprocessing filters -> streaming filter -> cuda displaced > detector filter -> ... > When the streaming filter is updated, all preprocessed projection data > will be store in RAM, which is not a problem so far. > However when executing the cuda displaced detector filter, RAM to GRAM > copy will be triggered. In my case the GRAM is not big enough to store > the data. > I know --lowmem will work but when it combines with --division the > projection files will be re-read several times from harddisk, which is > quite inefficient and slow. > > My previous temporary solution is to use the streaming filter as a sort of > isolator: > Instead of updating the streaming filter in the first step, I only update > the last preprocessing filter. > This way, when updating the remaining part of the pipeline, the buffered > region of the input of the streaming filter will be the full stack of > projections, but the buffered region of the output of the streaming filter > will just be the requested region by the cuda displaced detector filter > (#subsetsize projections). Then there is no problem to copy this small > amount of projections from RAM to GRAM during execution of the cuda > displaced detector filter. > Nevertheless looking at your explanations about the purpose of the > streaming filter, I found this is not an optimal solution. > > Now I am thinking to add a simple filter between the streaming filter and > the cuda displace detector filter for isolation, so that its input will > buffer the full stack of projections after updating the streaming filter, > but its output only buffers the requested region (#subsetsize projections). > How do you think about this solution? Any better opinions? > > Regards, > Chao > > > 2015-06-11 19:19 GMT+02:00 Simon Rit : > >> Not stupid at all. We have recently introduced the possibility to >> automatically compute the I0 (pixel value without object). This is the >> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >> doc . >> In many scanners, the exposure varies from frame-to-frame and we wanted >> this to be projection-specific which is why we did this. We also think that >> all the preprocessing is more efficient per projection but this is pure >> conjecture. >> There were only pros in our opinion but do you see cons to this solution? >> Simon >> >> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >> >>> Hi all, >>> >>> Maybe a stupid question... what is the purpose of the streaming filter >>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>> Thanks. >>> >>> Regards, Chao >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 17:35:05 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 11 Jun 2015 23:35:05 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Sorry, I see what I missed: the whole stack projection is loaded by the displaced detector filter. I think the best would be to move the displaced detector filter in the FDKConeBeamReconstructionFilter, between the extract and the FDKWeightProjectionFilter or to roll back to the CPU displaced detector imagefilter. On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit wrote: > Interesting problem. First a comment: normally with mhd files, it only > reads from disk what is requested, not the whole projection. I have > implemented FDK so that it only request the lines that are necessary for > the piece of the volume that is being computed. However, the full > projection is read with some input formats that did not implement streaming > or if you use the --hannY option or the scatter glare correction. Another > comment that crosses my mind: once it's been read from disk once, if you > have enough ram, it will be cached and the second time it reads it should > be much faster, as if it were in RAM. > For your solution, I would say that it's already what it does. The reader, > the preprocessing and the streaming are encapsulated in the > rtk::ProjectionsReader so if you request the full stack from the > projections reader, i.e., without > the --lowmem option, it will compute the whole stack but it will do it > one projection at a time since there is a streaming filter encapsulated. Is > this not what you observe? Projections will still be loaded substack per > substack to the gpu after since there is an extract filter in FDK. In > short, don't use the --lowmem option and you should be set. If not, let me > know because there is something I'm missing or not working. > Simon > > On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: > >> Thanks Simon, it is clear. >> >> I have an issue with rtkfdk. When using cuda, the first several (mini-) >> filters in rtkfdk look like this: >> file reader -> preprocessing filters -> streaming filter -> cuda >> displaced detector filter -> ... >> When the streaming filter is updated, all preprocessed projection data >> will be store in RAM, which is not a problem so far. >> However when executing the cuda displaced detector filter, RAM to GRAM >> copy will be triggered. In my case the GRAM is not big enough to store >> the data. >> I know --lowmem will work but when it combines with --division the >> projection files will be re-read several times from harddisk, which is >> quite inefficient and slow. >> >> My previous temporary solution is to use the streaming filter as a sort >> of isolator: >> Instead of updating the streaming filter in the first step, I only update >> the last preprocessing filter. >> This way, when updating the remaining part of the pipeline, the buffered >> region of the input of the streaming filter will be the full stack of >> projections, but the buffered region of the output of the streaming filter >> will just be the requested region by the cuda displaced detector filter >> (#subsetsize projections). Then there is no problem to copy this small >> amount of projections from RAM to GRAM during execution of the cuda >> displaced detector filter. >> Nevertheless looking at your explanations about the purpose of the >> streaming filter, I found this is not an optimal solution. >> >> Now I am thinking to add a simple filter between the streaming filter and >> the cuda displace detector filter for isolation, so that its input will >> buffer the full stack of projections after updating the streaming filter, >> but its output only buffers the requested region (#subsetsize >> projections). How do you think about this solution? Any better opinions? >> >> Regards, >> Chao >> >> >> 2015-06-11 19:19 GMT+02:00 Simon Rit : >> >>> Not stupid at all. We have recently introduced the possibility to >>> automatically compute the I0 (pixel value without object). This is the >>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>> doc . >>> In many scanners, the exposure varies from frame-to-frame and we wanted >>> this to be projection-specific which is why we did this. We also think that >>> all the preprocessing is more efficient per projection but this is pure >>> conjecture. >>> There were only pros in our opinion but do you see cons to this solution? >>> Simon >>> >>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>> >>>> Hi all, >>>> >>>> Maybe a stupid question... what is the purpose of the streaming filter >>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>> Thanks. >>>> >>>> Regards, Chao >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 17:56:54 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 11 Jun 2015 23:56:54 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: This is exactly my problem. There is also a parker short scan filter after the dd filter. If I move the ddf then pssf shall also be moved. This may be too much change. If I use the CPU version of ddf, I guess the same issue will occur at pssf, then I shall use CPU version of pssf as well. Sounds also a suboptimal solution. Maybe adding an extract filter between reader and ddf is still the most straightforward way? Then I guess the later extract filter in the fdk will be inplace and do nothing? Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?11? 11:35 PM? "Simon Rit" ??? > Sorry, I see what I missed: the whole stack projection is loaded by the > displaced detector filter. I think the best would be to move the displaced > detector filter in the FDKConeBeamReconstructionFilter, between the extract > and the FDKWeightProjectionFilter or to roll back to the CPU displaced > detector imagefilter. > > On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Interesting problem. First a comment: normally with mhd files, it only >> reads from disk what is requested, not the whole projection. I have >> implemented FDK so that it only request the lines that are necessary for >> the piece of the volume that is being computed. However, the full >> projection is read with some input formats that did not implement streaming >> or if you use the --hannY option or the scatter glare correction. Another >> comment that crosses my mind: once it's been read from disk once, if you >> have enough ram, it will be cached and the second time it reads it should >> be much faster, as if it were in RAM. >> For your solution, I would say that it's already what it does. The >> reader, the preprocessing and the streaming are encapsulated in the >> rtk::ProjectionsReader so if you request the full stack from the >> projections reader, i.e., without >> the --lowmem option, it will compute the whole stack but it will do it >> one projection at a time since there is a streaming filter encapsulated. Is >> this not what you observe? Projections will still be loaded substack per >> substack to the gpu after since there is an extract filter in FDK. In >> short, don't use the --lowmem option and you should be set. If not, let me >> know because there is something I'm missing or not working. >> Simon >> >> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >> >>> Thanks Simon, it is clear. >>> >>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>> filters in rtkfdk look like this: >>> file reader -> preprocessing filters -> streaming filter -> cuda >>> displaced detector filter -> ... >>> When the streaming filter is updated, all preprocessed projection data >>> will be store in RAM, which is not a problem so far. >>> However when executing the cuda displaced detector filter, RAM to GRAM >>> copy will be triggered. In my case the GRAM is not big enough to store >>> the data. >>> I know --lowmem will work but when it combines with --division the >>> projection files will be re-read several times from harddisk, which is >>> quite inefficient and slow. >>> >>> My previous temporary solution is to use the streaming filter as a sort >>> of isolator: >>> Instead of updating the streaming filter in the first step, I only >>> update the last preprocessing filter. >>> This way, when updating the remaining part of the pipeline, the buffered >>> region of the input of the streaming filter will be the full stack of >>> projections, but the buffered region of the output of the streaming filter >>> will just be the requested region by the cuda displaced detector filter >>> (#subsetsize projections). Then there is no problem to copy this small >>> amount of projections from RAM to GRAM during execution of the cuda >>> displaced detector filter. >>> Nevertheless looking at your explanations about the purpose of the >>> streaming filter, I found this is not an optimal solution. >>> >>> Now I am thinking to add a simple filter between the streaming filter >>> and the cuda displace detector filter for isolation, so that its input will >>> buffer the full stack of projections after updating the streaming filter, >>> but its output only buffers the requested region (#subsetsize >>> projections). How do you think about this solution? Any better opinions? >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>> >>>> Not stupid at all. We have recently introduced the possibility to >>>> automatically compute the I0 (pixel value without object). This is the >>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>> doc . >>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>> this to be projection-specific which is why we did this. We also think that >>>> all the preprocessing is more efficient per projection but this is pure >>>> conjecture. >>>> There were only pros in our opinion but do you see cons to this >>>> solution? >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>> >>>>> Hi all, >>>>> >>>>> Maybe a stupid question... what is the purpose of the streaming filter >>>>> at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>> Thanks. >>>>> >>>>> Regards, Chao >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing list >>>>> Rtk-users at public.kitware.com >>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 11 18:31:52 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 12 Jun 2015 00:31:52 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: The problem of an extract filter is that you need to set the extract region, I don't think that the requested region is the default. I would simply use an addimagefilter with a 0 constant or a multiplyimagefilter with a 1 constant... On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > This is exactly my problem. > > There is also a parker short scan filter after the dd filter. If I move > the ddf then pssf shall also be moved. This may be too much change. > > If I use the CPU version of ddf, I guess the same issue will occur at > pssf, then I shall use CPU version of pssf as well. Sounds also a > suboptimal solution. > > Maybe adding an extract filter between reader and ddf is still the most > straightforward way? Then I guess the later extract filter in the fdk will > be inplace and do nothing? > > Regards, Chao > Sent from Samsung Galaxy Note 3 > 2015?6?11? 11:35 PM? "Simon Rit" ??? > >> Sorry, I see what I missed: the whole stack projection is loaded by the >> displaced detector filter. I think the best would be to move the displaced >> detector filter in the FDKConeBeamReconstructionFilter, between the extract >> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >> detector imagefilter. >> >> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Interesting problem. First a comment: normally with mhd files, it only >>> reads from disk what is requested, not the whole projection. I have >>> implemented FDK so that it only request the lines that are necessary for >>> the piece of the volume that is being computed. However, the full >>> projection is read with some input formats that did not implement streaming >>> or if you use the --hannY option or the scatter glare correction. Another >>> comment that crosses my mind: once it's been read from disk once, if you >>> have enough ram, it will be cached and the second time it reads it should >>> be much faster, as if it were in RAM. >>> For your solution, I would say that it's already what it does. The >>> reader, the preprocessing and the streaming are encapsulated in the >>> rtk::ProjectionsReader so if you request the full stack from the >>> projections reader, i.e., without >>> the --lowmem option, it will compute the whole stack but it will do it >>> one projection at a time since there is a streaming filter encapsulated. Is >>> this not what you observe? Projections will still be loaded substack per >>> substack to the gpu after since there is an extract filter in FDK. In >>> short, don't use the --lowmem option and you should be set. If not, let me >>> know because there is something I'm missing or not working. >>> Simon >>> >>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>> >>>> Thanks Simon, it is clear. >>>> >>>> I have an issue with rtkfdk. When using cuda, the first several (mini-) >>>> filters in rtkfdk look like this: >>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>> displaced detector filter -> ... >>>> When the streaming filter is updated, all preprocessed projection data >>>> will be store in RAM, which is not a problem so far. >>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>> copy will be triggered. In my case the GRAM is not big enough to store >>>> the data. >>>> I know --lowmem will work but when it combines with --division the >>>> projection files will be re-read several times from harddisk, which is >>>> quite inefficient and slow. >>>> >>>> My previous temporary solution is to use the streaming filter as a sort >>>> of isolator: >>>> Instead of updating the streaming filter in the first step, I only >>>> update the last preprocessing filter. >>>> This way, when updating the remaining part of the pipeline, the >>>> buffered region of the input of the streaming filter will be the full stack >>>> of projections, but the buffered region of the output of the streaming >>>> filter will just be the requested region by the cuda displaced detector >>>> filter (#subsetsize projections). Then there is no problem to copy this >>>> small amount of projections from RAM to GRAM during execution of the cuda >>>> displaced detector filter. >>>> Nevertheless looking at your explanations about the purpose of the >>>> streaming filter, I found this is not an optimal solution. >>>> >>>> Now I am thinking to add a simple filter between the streaming filter >>>> and the cuda displace detector filter for isolation, so that its input will >>>> buffer the full stack of projections after updating the streaming filter, >>>> but its output only buffers the requested region (#subsetsize >>>> projections). How do you think about this solution? Any better >>>> opinions? >>>> >>>> Regards, >>>> Chao >>>> >>>> >>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>> >>>>> Not stupid at all. We have recently introduced the possibility to >>>>> automatically compute the I0 (pixel value without object). This is the >>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>> doc >>>>> . >>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>> this to be projection-specific which is why we did this. We also think that >>>>> all the preprocessing is more efficient per projection but this is pure >>>>> conjecture. >>>>> There were only pros in our opinion but do you see cons to this >>>>> solution? >>>>> Simon >>>>> >>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>> Thanks. >>>>>> >>>>>> Regards, Chao >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Jun 11 18:36:39 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 12 Jun 2015 00:36:39 +0200 Subject: [Rtk-users] Streaming filter in ProjectionsReader In-Reply-To: References: Message-ID: Great suggestions. I'll play with them tomorrow. Thanks. Regards, Chao Sent from Samsung Galaxy Note 3 2015?6?12? 12:32 AM? "Simon Rit" ??? > The problem of an extract filter is that you need to set the extract > region, I don't think that the requested region is the default. I would > simply use an addimagefilter with a 0 constant or a multiplyimagefilter > with a 1 constant... > > On Thu, Jun 11, 2015 at 11:56 PM, Chao Wu wrote: > >> This is exactly my problem. >> >> There is also a parker short scan filter after the dd filter. If I move >> the ddf then pssf shall also be moved. This may be too much change. >> >> If I use the CPU version of ddf, I guess the same issue will occur at >> pssf, then I shall use CPU version of pssf as well. Sounds also a >> suboptimal solution. >> >> Maybe adding an extract filter between reader and ddf is still the most >> straightforward way? Then I guess the later extract filter in the fdk will >> be inplace and do nothing? >> >> Regards, Chao >> Sent from Samsung Galaxy Note 3 >> 2015?6?11? 11:35 PM? "Simon Rit" ??? >> >>> Sorry, I see what I missed: the whole stack projection is loaded by the >>> displaced detector filter. I think the best would be to move the displaced >>> detector filter in the FDKConeBeamReconstructionFilter, between the extract >>> and the FDKWeightProjectionFilter or to roll back to the CPU displaced >>> detector imagefilter. >>> >>> On Thu, Jun 11, 2015 at 11:31 PM, Simon Rit < >>> simon.rit at creatis.insa-lyon.fr> wrote: >>> >>>> Interesting problem. First a comment: normally with mhd files, it only >>>> reads from disk what is requested, not the whole projection. I have >>>> implemented FDK so that it only request the lines that are necessary for >>>> the piece of the volume that is being computed. However, the full >>>> projection is read with some input formats that did not implement streaming >>>> or if you use the --hannY option or the scatter glare correction. Another >>>> comment that crosses my mind: once it's been read from disk once, if you >>>> have enough ram, it will be cached and the second time it reads it should >>>> be much faster, as if it were in RAM. >>>> For your solution, I would say that it's already what it does. The >>>> reader, the preprocessing and the streaming are encapsulated in the >>>> rtk::ProjectionsReader so if you request the full stack from the >>>> projections reader, i.e., without >>>> the --lowmem option, it will compute the whole stack but it will do it >>>> one projection at a time since there is a streaming filter encapsulated. Is >>>> this not what you observe? Projections will still be loaded substack per >>>> substack to the gpu after since there is an extract filter in FDK. In >>>> short, don't use the --lowmem option and you should be set. If not, let me >>>> know because there is something I'm missing or not working. >>>> Simon >>>> >>>> On Thu, Jun 11, 2015 at 10:52 PM, Chao Wu wrote: >>>> >>>>> Thanks Simon, it is clear. >>>>> >>>>> I have an issue with rtkfdk. When using cuda, the first several >>>>> (mini-) filters in rtkfdk look like this: >>>>> file reader -> preprocessing filters -> streaming filter -> cuda >>>>> displaced detector filter -> ... >>>>> When the streaming filter is updated, all preprocessed projection data >>>>> will be store in RAM, which is not a problem so far. >>>>> However when executing the cuda displaced detector filter, RAM to GRAM >>>>> copy will be triggered. In my case the GRAM is not big enough to >>>>> store the data. >>>>> I know --lowmem will work but when it combines with --division the >>>>> projection files will be re-read several times from harddisk, which is >>>>> quite inefficient and slow. >>>>> >>>>> My previous temporary solution is to use the streaming filter as a >>>>> sort of isolator: >>>>> Instead of updating the streaming filter in the first step, I only >>>>> update the last preprocessing filter. >>>>> This way, when updating the remaining part of the pipeline, the >>>>> buffered region of the input of the streaming filter will be the full stack >>>>> of projections, but the buffered region of the output of the streaming >>>>> filter will just be the requested region by the cuda displaced detector >>>>> filter (#subsetsize projections). Then there is no problem to copy this >>>>> small amount of projections from RAM to GRAM during execution of the cuda >>>>> displaced detector filter. >>>>> Nevertheless looking at your explanations about the purpose of the >>>>> streaming filter, I found this is not an optimal solution. >>>>> >>>>> Now I am thinking to add a simple filter between the streaming filter >>>>> and the cuda displace detector filter for isolation, so that its input will >>>>> buffer the full stack of projections after updating the streaming filter, >>>>> but its output only buffers the requested region (#subsetsize >>>>> projections). How do you think about this solution? Any better >>>>> opinions? >>>>> >>>>> Regards, >>>>> Chao >>>>> >>>>> >>>>> 2015-06-11 19:19 GMT+02:00 Simon Rit : >>>>> >>>>>> Not stupid at all. We have recently introduced the possibility to >>>>>> automatically compute the I0 (pixel value without object). This is the >>>>>> filter I0EstimationProjectionFilter in the ProjectionsReader, see graph in >>>>>> doc >>>>>> . >>>>>> In many scanners, the exposure varies from frame-to-frame and we wanted >>>>>> this to be projection-specific which is why we did this. We also think that >>>>>> all the preprocessing is more efficient per projection but this is pure >>>>>> conjecture. >>>>>> There were only pros in our opinion but do you see cons to this >>>>>> solution? >>>>>> Simon >>>>>> >>>>>> On Thu, Jun 11, 2015 at 7:06 PM, Chao Wu wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> Maybe a stupid question... what is the purpose of the streaming >>>>>>> filter at the end of the mini-filter pipeline inside the ProjectionsReader? >>>>>>> Thanks. >>>>>>> >>>>>>> Regards, Chao >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Jun 12 10:02:03 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 12 Jun 2015 16:02:03 +0200 Subject: [Rtk-users] for information In-Reply-To: References: <03330171479768b90d38658e5fb20eb6@pop3.creatis.insa-lyon.fr> <557A8C35.1040501@creatis.insa-lyon.fr> Message-ID: <557AE65B.4050805@creatis.insa-lyon.fr> Hi Lin, Let us continue this conversation on the RTK mailing list. ITK has a mechanism to do what you need, it is called ImageAdaptors, and in your case, NthElementImageAdaptor. The example in the ITK documentation is very clear: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement This is if you want to send your component images to various filters after having extracted them from the original gradient image. If, on the other hand, you only need to perform some simple processing, you can elaborate on the code I sent, for example: itk::ImageRegionIterator gradientIterator (yourSecondGradientImage, yourSecondGradientImage->GetLargestPossibleRegion()); itk::ImageRegionIterator outputIterator (yourOutputGradientImage, yourOutputGradientImage->GetLargestPossibleRegion()); typename TGradientOutputImageType::PixelType vector; while(!gradientIterator.IsAtEnd()) { vector = gradientIterator.Get(); vector[0] += 1: // Or whatever other processing you want to perform on the first coordinate vector[1] += 1: // Or whatever other processing you want to perform on the second coordinate vector[2] += 1: // Or whatever other processing you want to perform on the third coordinate outputIterator.Set( vector ); ++gradientIterator; ++outputIterator; } Regarding the Fourier transform: ITK has built-in FFT (slow) and can use FFTW (you have to activate it in the CMake options, as it has a different licensing than ITK). I has been a while since I last used it, so I cannot help much. I recommend you have a look at the documentation, and maybe write to the ITK mailing list if you still do not succeed. A good place to start could be here : http://www.itk.org/Doxygen/html/group__ITKFFT.html Regards, Cyril On 06/12/2015 03:32 PM, liwang wrote: > Dear Cyril, > > > Good afternoon! Thanks very much for your reply! > > In fact, I only have an rtk::ForwardDifferenceGradientImageFilter > > and the output "u" of this filter is three gradient images (u_1, u_2, > u_3) for three directions (x ,y, z) of the input image > > Now I want to do some things to these gradient images separately. > > And my problem is: I don't know to get these gradient images for > directions (x,y,z) from the output "u" the > "ForwardDifferenceGradientImageFilter". > > > Thanks very much! > PS: How can I implement inverse FFT algorithm on RTK? > > lin > > > > > > On 2015-06-12 09:37, Cyril Mory wrote: >> Hi Lin, >> >> Let me re-explain what I understand. And correct me if I'm wrong. >> You want to compute the subtraction of two gradient images: one is the >> output of an rtk::ForwardDifferenceGradientImageFilter, and you did >> not explain where the other one comes from. >> >> One first important thing to understand: ITK can compute the >> subtraction of two covariant vectors u and v easily. You just have to >> write "w = u - v", and internally it will compute >> (w_1) = (u_1 - v_1) >> (w_2) = (u_2 - v_2) >> (w_3) = (u_3 - v_3) >> because the operator '-' between two covariant vectors is properly >> redefined in ITK. >> >> Therefore, a simple subtract filter can do what you want if you set >> the type correctly (TGradientOutputImageType). >> If you want to do it with iterators, you do not need the loop "for >> (unsigned int h=0; h < 3; h++)" >> Simply writing something like this should work : >> >> ---------------- >> itk::ImageRegionIterator gradientIterator1 >> (m_Gradient->GetOutput(), >> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >> itk::ImageRegionIterator gradientIterator2 >> (yourSecondGradientImage, >> yourSecondGradientImage->GetLargestPossibleRegion()); >> itk::ImageRegionIterator outputIterator >> (yourOutputGradientImage, >> yourOutputGradientImage->GetLargestPossibleRegion()); >> >> while(!gradientIterator.IsAtEnd()) >> { >> outputIterator.Set( gradientIterator1.Get() - >> gradientIterator2.Get() ); >> ++gradientIterator1; >> ++gradientIterator2; >> ++outputIterator; >> } >> ---------------- >> >> Does that help ? >> Cyril >> >> On 06/11/2015 07:26 PM, liwang wrote: >>> Dear Cyril, >>> >>> Good afternoon! I hope everything goes well for you >>> >>> I am writing for consulting some information about >>> itk::covariantVector, and I want subtract each gradient from the >>> "TGradientOutputImageType" type. >>> >>> If I have a image f, and after gradient filter, gradient of f >>> was obtained, and the definition of of Gradient image is: >>> >>> typedef float OutputPixelType; >>> const unsigned int Dimension = 3; >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> typedef itk::Image >> , Dimension> TGradientOutputImageType; >>> >>> >>> Now My problem is I want obtain gradient_x, gradient_y, gradient_z >>> from the output of the rtk::ForwardDifferenceGradientImagefilter >>> (filter to compute gradient of f) >>> >>> I mean, I tried many methods to subtract gradients of each direction >>> from the output of gradient filter, but I failed. >>> >>> >>> I tried : >>> ====> >>> itk::ImageRegionIterator gradientIterator1 >>> (m_Gradient->GetOutput(), >>> m_Gradient->GetOutput()->GetLargestPossibleRegion()); >>> itk::Image::IndexType imageIndex; >>> for (unsigned int h=0; h < 3; h++) >>> { >>> pixelIndex[0]=h; >>> itk::CovariantVector v = >>> gradientIterator1.GetImage()->GetPixel(imageIndex); >>> >>> } >>> ===> >>> OutputImageType::RegionType region= >>> m_Gradient->GetOutput()->GetLargestPossibleRegion(); >>> OutputImageType::pointer gradient_x; >>> >>> gradient_x->SetRegions(region); >>> >>> >>> >>> Would you like to give me some advice? >>> Thanks very much! >>> >>> Best wishes! >>> >>> Lin >>> 2015-6-11 > From theday79 at gmail.com Mon Jun 15 10:40:37 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 15 Jun 2015 10:40:37 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <001d01d0a778$be609860$3b21c920$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> Message-ID: <002e01d0a779$3f61cd80$be256880$@gmail.com> Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Mon Jun 15 11:19:47 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Mon, 15 Jun 2015 19:49:47 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <002e01d0a779$3f61cd80$be256880$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 15 11:29:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 15 Jun 2015 17:29:27 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: Hi, Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem. Simon On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Tue Jun 16 02:39:46 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 16 Jun 2015 08:39:46 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> Message-ID: <557FC4B2.5060504@creatis.insa-lyon.fr> Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > _ > _ > > regards > > safdari > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: > > Hi Safdary, > > Again, please cc rtk-users at openrtk.org > when you send your email, since > other users (much better experts than me!) can give us any > suggestions. > > Thanks. > > Yang > > *From:*Yang K Park [mailto:theday79 at gmail.com > ] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Safdary, > > I recommend you to try rtkfdk.exe first (with cuda option) to see > if it works for you. > > The example of the command line would be: > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his > --output test_output.mha --verbos --spacing 1,1,1 --dimension > 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda > > If it works for your image, then you can mimic the original rtkfdk > code to make your own one. > > Good luck! > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio > 2012 when rtk use cuda > > Hi Yang > > I have tried to adjust the window/level to see something inside of > the image but all pixels set to zero. > > _My code is:_ > > #defineUSE_CUDA > > intmain(int, char**) > > { > > //// variable > > constunsignedintDimension = 3; > > typedeffloatOutputPixelType; > > #ifdefUSE_CUDA > > typedefitk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedefitk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointernames = > itk::RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedefrtk::ThreeDCircularProjectionGeometryGeometryType; > > GeometryType::Pointergeometry = GeometryType::New(); > > // Projection matrices > > unsignedintnumberOfProjections = 86; > > unsignedintfirstAngle = 0; > > unsignedintangularArc = 360; > > unsignedintsid = 1000; > > unsignedintsdd = 1200; > > intisox = 0; > > intisoy = 0 ; > > for(unsignedintnoProj=0; noProj > { > > doubleangle = (float)firstAngle + (float)noProj * angularArc / > (float)numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedefrtk::ProjectionsReader< OutputImageType> ReaderType; > > ReaderType::Pointerreader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedefrtk::ConstantImageSource< OutputImageType> > ConstantImageSourceType; > > ConstantImageSourceType::PointerImageSource = > ConstantImageSourceType::New(); > > ConstantImageSourceType::PointTypeorigin; > > ConstantImageSourceType::SizeTypesizeOutput; > > ConstantImageSourceType::SpacingTypespacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction"<< std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdefUSE_CUDA > > typedefrtk::CudaFDKConeBeamReconstructionFilterFDKType; > > #elifUSE_OPENCL > > typedefrtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedefrtk::FDKConeBeamReconstructionFilter< OutputImageType > > FDKType; > > #endif > > FDKType::Pointerfeldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image"<< std::endl; > > // Writer > > typedefitk::Image< float, 3 > ImageType; > > typedefitk::ImageFileWriter WriterType; > > WriterType::Pointerwriter = WriterType::New(); > > writer->SetFileName( "output11.mha"); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > getchar(); > > return0; > > } > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 04:14:37 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 10:14:37 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, The consensus date is Friday July 31, 2015. Save the date! The meeting will be at the L?on B?rard center in Lyon, I'll soon provide more details on the organization. Simon On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit wrote: > Dear RTK users and developers, > We are a few users to face the same problem of poor image quality in > cone-beam CT due to photon statistics, detector effects (lag, glare, ...), > beam hardening and/or scatter. RTK has basic solutions, there are other > solutions being implemented and we would like better solutions implemented. > I would like to invite those that want to contribute to this topic to a > one-day meeting in Lyon the last week of July. > > Goals: > - present and discuss existing RTK solutions, > - present and discuss solutions being implemented in RTK, > - propose the development of new solutions and share the work. > > Place: Lyon, France (exact location to be announced) > > Time: last week of July, day to be determined, please complete foodle if > you're interested. > > Cost: free but you'll have to organize your travel and hotel plans (I'll > send suggestions later). > > If there is a specific algorithm that you would like to discuss, please send > me an email with the reference. I will put together a list of references to > read before the meeting. > I hope to see you all at the end of July. > Simon From guangming.zang at kaust.edu.sa Tue Jun 16 09:47:09 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 16:47:09 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images Message-ID: Hi RTK community, Sorry to bother you again, but i was wondering for the projections in the format of .bmp and .tif files. (e.g., say the bmp images range from [0,255], tif images range from [1,521]) . what are the next steps and preprocessing pipelines in RTK for bmp and tif ?? I look into the rtkProjectionsReader.txx, however, for me, i think it does not explain clearly. So anyone can help me? with my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 10:41:08 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 16:41:08 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png For tif and bmp I think they go through the left most path (except for the Elekta branch). 2015-06-16 15:47 GMT+02:00 Guangming Zang : > Hi RTK community, > Sorry to bother you again, but i was wondering for the projections in the > format of .bmp and .tif files. (e.g., say the bmp images range from > [0,255], tif images range from [1,521]) . what are the next steps and > preprocessing pipelines in RTK for bmp and tif ?? I look into the > rtkProjectionsReader.txx, however, for me, i think it does not explain > clearly. > So anyone can help me? > > with my Regards > Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 16 10:43:17 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 16 Jun 2015 16:43:17 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi, This is correct if your tif is of type "unsigned short". Simon On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > For tif and bmp I think they go through the left most path (except for the > Elekta branch). > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : >> >> Hi RTK community, >> Sorry to bother you again, but i was wondering for the projections in the >> format of .bmp and .tif files. (e.g., say the bmp images range from >> [0,255], tif images range from [1,521]) . what are the next steps and >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> clearly. >> So anyone can help me? >> >> with my Regards >> Guangming >> >> Guangming Zang (Alex) >> King Abdullah University of Science and Technology(KAUST) >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> ________________________________ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete this >> message from your computer system. Any unauthorized use or distribution is >> prohibited. Please consider the environment before printing this email. > > From guangming.zang at kaust.edu.sa Tue Jun 16 13:42:01 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 20:42:01 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Thanks Chao and Simon. Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same with unsigned short. Another question related to geometry is that, several months ago, i asked the tif file geometey settings, and Chao replied and kindly pointed that i should be careful about image's dpi But, i still can not understand why it is related to image's dpi. For example, my tif images' information and some geometry information from scanner are like this: * 1916*1536 dimensions * * pixelsize 0.127* * SDD 983* * SID 413* The interesting part is that, when using rtksimulatedgeometry command , i set all parameters identical to physical distance (mm). it does not show anything, not matter care about dpi or not(suppose rtkfdk command after that is correct). i.e., 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" But when i set the *sdd *divide by pixelsize(0.127), and other parameters like this, it reconstructed a volume seems correct(at least show the whole object) 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" so would you please help me to find what happened?? Sorry , again for this long letter. :( Thanks very much. With my Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 17:43 GMT+03:00 Simon Rit : > Hi, > This is correct if your tif is of type "unsigned short". > Simon > > On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: > > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png > > For tif and bmp I think they go through the left most path (except for > the > > Elekta branch). > > > > > > 2015-06-16 15:47 GMT+02:00 Guangming Zang : > >> > >> Hi RTK community, > >> Sorry to bother you again, but i was wondering for the projections in > the > >> format of .bmp and .tif files. (e.g., say the bmp images range from > >> [0,255], tif images range from [1,521]) . what are the next steps and > >> preprocessing pipelines in RTK for bmp and tif ?? I look into the > >> rtkProjectionsReader.txx, however, for me, i think it does not explain > >> clearly. > >> So anyone can help me? > >> > >> with my Regards > >> Guangming > >> > >> Guangming Zang (Alex) > >> King Abdullah University of Science and Technology(KAUST) > >> University of Chinese Academy of Sciences(UCAS) > >> > >> > >> > >> > >> ________________________________ > >> This message and its contents, including attachments are intended solely > >> for the original recipient. If you are not the intended recipient or > have > >> received this message in error, please notify me immediately and delete > this > >> message from your computer system. Any unauthorized use or distribution > is > >> prohibited. Please consider the environment before printing this email. > > > > > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:56:27 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:56:27 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the pixel size is NOT SET and then by default of itk/rtk 1 mm... By the way with the latest version of rtk you can overwrite the projection image metadata (including pixel size) with command line argument. You can try to put --neworigin 0.127 and see what happens. Regards, Chao 2015-06-16 19:42 GMT+02:00 Guangming Zang : > Thanks Chao and Simon. > Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same > with unsigned short. > Another question related to geometry is that, several months ago, i asked > the tif file geometey settings, and Chao replied and kindly pointed that > > i should be careful about image's dpi > But, i still can not understand why it is related to image's dpi. > For example, my tif images' information and some geometry information > from scanner are like this: > * 1916*1536 dimensions * > * pixelsize 0.127* > * SDD 983* > * SID 413* > The interesting part is that, when using rtksimulatedgeometry command , i > set all parameters identical to physical distance (mm). it does not show > anything, not matter care about dpi or not(suppose rtkfdk command after > that is correct). i.e., > 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi > 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" > --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" > > > But when i set the *sdd *divide by pixelsize(0.127), and other > parameters like this, it reconstructed a volume seems correct(at least > show the whole object) > > 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" > --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" > > so would you please help me to find what happened?? > > Sorry , again for this long letter. :( > > Thanks very much. > > With my Regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 17:43 GMT+03:00 Simon Rit : > >> Hi, >> This is correct if your tif is of type "unsigned short". >> Simon >> >> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >> > For tif and bmp I think they go through the left most path (except for >> the >> > Elekta branch). >> > >> > >> > 2015-06-16 15:47 GMT+02:00 Guangming Zang > >: >> >> >> >> Hi RTK community, >> >> Sorry to bother you again, but i was wondering for the projections in >> the >> >> format of .bmp and .tif files. (e.g., say the bmp images range from >> >> [0,255], tif images range from [1,521]) . what are the next steps and >> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >> >> clearly. >> >> So anyone can help me? >> >> >> >> with my Regards >> >> Guangming >> >> >> >> Guangming Zang (Alex) >> >> King Abdullah University of Science and Technology(KAUST) >> >> University of Chinese Academy of Sciences(UCAS) >> >> >> >> >> >> >> >> >> >> ________________________________ >> >> This message and its contents, including attachments are intended >> solely >> >> for the original recipient. If you are not the intended recipient or >> have >> >> received this message in error, please notify me immediately and >> delete this >> >> message from your computer system. Any unauthorized use or >> distribution is >> >> prohibited. Please consider the environment before printing this email. >> > >> > >> > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Tue Jun 16 13:58:31 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Tue, 16 Jun 2015 19:58:31 +0200 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Sorry, not "neworigin" but "newspacing" 2015-06-16 19:56 GMT+02:00 Chao Wu : > Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the > pixel size is NOT SET and then by default of itk/rtk 1 mm... > By the way with the latest version of rtk you can overwrite the projection > image metadata (including pixel size) with command line argument. You can > try to put --neworigin 0.127 and see what happens. > > Regards, > Chao > > > 2015-06-16 19:42 GMT+02:00 Guangming Zang : > >> Thanks Chao and Simon. >> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >> with unsigned short. >> Another question related to geometry is that, several months ago, i >> asked the tif file geometey settings, and Chao replied and kindly >> pointed that >> >> i should be careful about image's dpi >> But, i still can not understand why it is related to image's dpi. >> For example, my tif images' information and some geometry information >> from scanner are like this: >> * 1916*1536 dimensions * >> * pixelsize 0.127* >> * SDD 983* >> * SID 413* >> The interesting part is that, when using rtksimulatedgeometry command >> , i set all parameters identical to physical distance (mm). it does not >> show anything, not matter care about dpi or not(suppose rtkfdk command >> after that is correct). i.e., >> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >> >> >> But when i set the *sdd *divide by pixelsize(0.127), and other >> parameters like this, it reconstructed a volume seems correct(at least >> show the whole object) >> >> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >> >> so would you please help me to find what happened?? >> >> Sorry , again for this long letter. :( >> >> Thanks very much. >> >> With my Regards >> Guangming >> >> >> >> >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-16 17:43 GMT+03:00 Simon Rit : >> >>> Hi, >>> This is correct if your tif is of type "unsigned short". >>> Simon >>> >>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>> > For tif and bmp I think they go through the left most path (except for >>> the >>> > Elekta branch). >>> > >>> > >>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang >> >: >>> >> >>> >> Hi RTK community, >>> >> Sorry to bother you again, but i was wondering for the projections >>> in the >>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>> >> rtkProjectionsReader.txx, however, for me, i think it does not explain >>> >> clearly. >>> >> So anyone can help me? >>> >> >>> >> with my Regards >>> >> Guangming >>> >> >>> >> Guangming Zang (Alex) >>> >> King Abdullah University of Science and Technology(KAUST) >>> >> University of Chinese Academy of Sciences(UCAS) >>> >> >>> >> >>> >> >>> >> >>> >> ________________________________ >>> >> This message and its contents, including attachments are intended >>> solely >>> >> for the original recipient. If you are not the intended recipient or >>> have >>> >> received this message in error, please notify me immediately and >>> delete this >>> >> message from your computer system. Any unauthorized use or >>> distribution is >>> >> prohibited. Please consider the environment before printing this >>> email. >>> > >>> > >>> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 14:14:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 21:14:02 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Hi Chao, Thanks so much for your kind and very prompt reply. Actually, we do not have the pixel size information in image. what we know about TIF image is : *1916*1536 dimensions* *300 dpi* *16 bit depth* And also i have the information in the geometry .xml file about the detector: DetectorPixelsX=1916 DetectorPixelsY=1536 DetectorPixelSizeX=0.127 DetectorPixelSizeY=0.127 and the tif images's X and Y are the same with Detector(i.e., 1916*1536) so that's why i think the pixelsize IN TIF is 0.127. Sure i downloaded the latest version of RTK this afternoon and have not tried it yet. Thanks very much for this important information. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 20:58 GMT+03:00 Chao Wu : > Sorry, not "neworigin" but "newspacing" > > 2015-06-16 19:56 GMT+02:00 Chao Wu : > >> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >> pixel size is NOT SET and then by default of itk/rtk 1 mm... >> By the way with the latest version of rtk you can overwrite the >> projection image metadata (including pixel size) with command line >> argument. You can try to put --neworigin 0.127 and see what happens. >> >> Regards, >> Chao >> >> >> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >> >>> Thanks Chao and Simon. >>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>> with unsigned short. >>> Another question related to geometry is that, several months ago, i >>> asked the tif file geometey settings, and Chao replied and kindly >>> pointed that >>> >>> i should be careful about image's dpi >>> But, i still can not understand why it is related to image's dpi. >>> For example, my tif images' information and some geometry information >>> from scanner are like this: >>> * 1916*1536 dimensions * >>> * pixelsize 0.127* >>> * SDD 983* >>> * SID 413* >>> The interesting part is that, when using rtksimulatedgeometry command >>> , i set all parameters identical to physical distance (mm). it does >>> not show anything, not matter care about dpi or not(suppose rtkfdk >>> command after that is correct). i.e., >>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>> >>> >>> But when i set the *sdd *divide by pixelsize(0.127), and other >>> parameters like this, it reconstructed a volume seems correct(at least >>> show the whole object) >>> >>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>> >>> so would you please help me to find what happened?? >>> >>> Sorry , again for this long letter. :( >>> >>> Thanks very much. >>> >>> With my Regards >>> Guangming >>> >>> >>> >>> >>> >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>> >>>> Hi, >>>> This is correct if your tif is of type "unsigned short". >>>> Simon >>>> >>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>> > For tif and bmp I think they go through the left most path (except >>>> for the >>>> > Elekta branch). >>>> > >>>> > >>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>> guangming.zang at kaust.edu.sa>: >>>> >> >>>> >> Hi RTK community, >>>> >> Sorry to bother you again, but i was wondering for the projections >>>> in the >>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>> >> [0,255], tif images range from [1,521]) . what are the next steps and >>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>> explain >>>> >> clearly. >>>> >> So anyone can help me? >>>> >> >>>> >> with my Regards >>>> >> Guangming >>>> >> >>>> >> Guangming Zang (Alex) >>>> >> King Abdullah University of Science and Technology(KAUST) >>>> >> University of Chinese Academy of Sciences(UCAS) >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ________________________________ >>>> >> This message and its contents, including attachments are intended >>>> solely >>>> >> for the original recipient. If you are not the intended recipient or >>>> have >>>> >> received this message in error, please notify me immediately and >>>> delete this >>>> >> message from your computer system. Any unauthorized use or >>>> distribution is >>>> >> prohibited. Please consider the environment before printing this >>>> email. >>>> > >>>> > >>>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Tue Jun 16 15:06:08 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Tue, 16 Jun 2015 22:06:08 +0300 Subject: [Rtk-users] The preprocessing for .bmp and .tif images In-Reply-To: References: Message-ID: Well, very interesting. After taking Chao's advice and use the command --newspacing 0.127 in rtkfdk, i can got the correct result when the parameters are set identical to physical unit (mm). i.e., the commands are: rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" rtkfdk -p D:\Compare\FinalRTK\bin\Release\TOY -r .*.tif -o Result\T1.mha -g geometry.xml --newspacing 0.127 --spacing 1,1,1 --dimension 100,100,100 in which the geometry setting make more sense than before. Thanks! Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-16 21:14 GMT+03:00 Guangming Zang : > Hi Chao, > Thanks so much for your kind and very prompt reply. > > Actually, we do not have the pixel size information in image. what we > know about TIF image is : > *1916*1536 dimensions* > *300 dpi* > *16 bit depth* > > And also i have the information in the geometry .xml file about the > detector: > > DetectorPixelsX=1916 > DetectorPixelsY=1536 > DetectorPixelSizeX=0.127 > DetectorPixelSizeY=0.127 > > and the tif images's X and Y are the same with Detector(i.e., 1916*1536) > so that's why i think the pixelsize IN TIF is 0.127. > Sure i downloaded the latest version of RTK this afternoon and have not > tried it yet. Thanks very much for this important information. > > Best regards > Guangming > > > > > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-16 20:58 GMT+03:00 Chao Wu : > >> Sorry, not "neworigin" but "newspacing" >> >> 2015-06-16 19:56 GMT+02:00 Chao Wu : >> >>> Then it probably means the pixel size RECORDED IN TIF is 1 mm, or the >>> pixel size is NOT SET and then by default of itk/rtk 1 mm... >>> By the way with the latest version of rtk you can overwrite the >>> projection image metadata (including pixel size) with command line >>> argument. You can try to put --neworigin 0.127 and see what happens. >>> >>> Regards, >>> Chao >>> >>> >>> 2015-06-16 19:42 GMT+02:00 Guangming Zang : >>> >>>> Thanks Chao and Simon. >>>> Yes, my .tif images are 16 bit depth( uint16 ) , i think it is the same >>>> with unsigned short. >>>> Another question related to geometry is that, several months ago, i >>>> asked the tif file geometey settings, and Chao replied and kindly >>>> pointed that >>>> >>>> i should be careful about image's dpi >>>> But, i still can not understand why it is related to image's dpi. >>>> For example, my tif images' information and some geometry information >>>> from scanner are like this: >>>> * 1916*1536 dimensions * >>>> * pixelsize 0.127* >>>> * SDD 983* >>>> * SID 413* >>>> The interesting part is that, when using rtksimulatedgeometry >>>> command , i set all parameters identical to physical distance (mm). >>>> it does not show anything, not matter care about dpi or not(suppose >>>> rtkfdk command after that is correct). i.e., >>>> 1. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="983" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> or change the sid to 2/3 *sid because of 300 dpi instead of 200 dpi >>>> 2. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="655.3333" >>>> --sid="413" --proj_iso_x="-121.666" --proj_iso_y="-97.536" >>>> >>>> >>>> But when i set the *sdd *divide by pixelsize(0.127), and other >>>> parameters like this, it reconstructed a volume seems correct(at least >>>> show the whole object) >>>> >>>> 3. rtksimulatedgeometry -n 360 -o geometry.xml --sdd="7740.15748" >>>> --sid="413.423889" --proj_iso_x="-958" -proj_iso_y="-768" >>>> >>>> so would you please help me to find what happened?? >>>> >>>> Sorry , again for this long letter. :( >>>> >>>> Thanks very much. >>>> >>>> With my Regards >>>> Guangming >>>> >>>> >>>> >>>> >>>> >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> 2015-06-16 17:43 GMT+03:00 Simon Rit : >>>> >>>>> Hi, >>>>> This is correct if your tif is of type "unsigned short". >>>>> Simon >>>>> >>>>> On Tue, Jun 16, 2015 at 4:41 PM, Chao Wu wrote: >>>>> > Look at http://www.openrtk.org/Doxygen/dot_inline_dotgraph_16.png >>>>> > For tif and bmp I think they go through the left most path (except >>>>> for the >>>>> > Elekta branch). >>>>> > >>>>> > >>>>> > 2015-06-16 15:47 GMT+02:00 Guangming Zang < >>>>> guangming.zang at kaust.edu.sa>: >>>>> >> >>>>> >> Hi RTK community, >>>>> >> Sorry to bother you again, but i was wondering for the projections >>>>> in the >>>>> >> format of .bmp and .tif files. (e.g., say the bmp images range from >>>>> >> [0,255], tif images range from [1,521]) . what are the next steps >>>>> and >>>>> >> preprocessing pipelines in RTK for bmp and tif ?? I look into the >>>>> >> rtkProjectionsReader.txx, however, for me, i think it does not >>>>> explain >>>>> >> clearly. >>>>> >> So anyone can help me? >>>>> >> >>>>> >> with my Regards >>>>> >> Guangming >>>>> >> >>>>> >> Guangming Zang (Alex) >>>>> >> King Abdullah University of Science and Technology(KAUST) >>>>> >> University of Chinese Academy of Sciences(UCAS) >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> ________________________________ >>>>> >> This message and its contents, including attachments are intended >>>>> solely >>>>> >> for the original recipient. If you are not the intended recipient >>>>> or have >>>>> >> received this message in error, please notify me immediately and >>>>> delete this >>>>> >> message from your computer system. Any unauthorized use or >>>>> distribution is >>>>> >> prohibited. Please consider the environment before printing this >>>>> email. >>>>> > >>>>> > >>>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> >>> >>> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at uclouvain.be Wed Jun 17 08:05:36 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Wed, 17 Jun 2015 14:05:36 +0200 Subject: [Rtk-users] RTK training Message-ID: <55816290.1010807@uclouvain.be> Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril From ghostcz at hotmail.com Wed Jun 17 09:11:15 2015 From: ghostcz at hotmail.com (ghostcz) Date: Wed, 17 Jun 2015 15:11:15 +0200 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: Dear Cyril, I am interested in the development, especially the architecture and CUDA filters. Best regards, Louie -----Original Message----- From: Cyril Mory Sent: Wednesday, June 17, 2015 2:05 PM To: rtk-users at openrtk.org Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From guangming.zang at kaust.edu.sa Wed Jun 17 12:16:02 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 19:16:02 +0300 Subject: [Rtk-users] RTK training Message-ID: Hey all, i prefer first one, i.e, more detailed command line explanation. i wanna compare RTK results to mine, however, sometime the command line and flags are not clear . For example, in lastest rtkfdk command, for projection images preprocessing, so many command line there. And some are turned off by default while some are not. For example, what is default value for --wpc? --wpc=DOUBLE // Water precorrection coefficients Thanks. Best regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Wed Jun 17 12:47:35 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Wed, 17 Jun 2015 18:47:35 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: In rtkGgoFunction.h // Water precorrection if(args_info.wpc_given) { std::vector coeffs; coeffs.assign(args_info.wpc_arg, args_info.wpc_arg+args_info.wpc_given); reader->SetWaterPrecorrectionCoefficients(coeffs); } In rtkProjectionsReader.txx // Water coefficients if(m_WaterPrecorrectionCoefficients.size() != 0) { m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); m_WaterPrecorrectionFilter->SetInput(output); output->ReleaseDataFlagOn(); output = m_WaterPrecorrectionFilter->GetOutput(); } So it means by default wpc coefficients are not set at all and thus WPC filter is bypassed. Regards, Chao 2015-06-17 18:16 GMT+02:00 Guangming Zang : > Hey all, > i prefer first one, i.e, more detailed command line explanation. i wanna > compare RTK results to mine, however, sometime the command line and flags > are not clear . > For example, in lastest rtkfdk command, for projection images > preprocessing, so many command line there. > And some are turned off by default while some are not. For example, > what is default value for --wpc? > --wpc=DOUBLE // Water precorrection coefficients > Thanks. > Best regards > Guangming > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Wed Jun 17 14:43:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Wed, 17 Jun 2015 21:43:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Thanks for the help Chao. yes, just one example. we can make it like: --wpc=DOUBLE // Water precorrection coefficients, and turn it off by default. But anyway, maybe only my opinion, for other user in the community, maybe it is enough. Thanks again Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-17 19:47 GMT+03:00 Chao Wu : > In rtkGgoFunction.h > > // Water precorrection > if(args_info.wpc_given) > { > std::vector coeffs; > coeffs.assign(args_info.wpc_arg, > args_info.wpc_arg+args_info.wpc_given); > reader->SetWaterPrecorrectionCoefficients(coeffs); > } > > In rtkProjectionsReader.txx > > // Water coefficients > if(m_WaterPrecorrectionCoefficients.size() != 0) > { > > m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); > m_WaterPrecorrectionFilter->SetInput(output); > output->ReleaseDataFlagOn(); > output = m_WaterPrecorrectionFilter->GetOutput(); > } > > > So it means by default wpc coefficients are not set at all and thus WPC > filter is bypassed. > > Regards, Chao > > 2015-06-17 18:16 GMT+02:00 Guangming Zang : > >> Hey all, >> i prefer first one, i.e, more detailed command line explanation. i wanna >> compare RTK results to mine, however, sometime the command line and flags >> are not clear . >> For example, in lastest rtkfdk command, for projection images >> preprocessing, so many command line there. >> And some are turned off by default while some are not. For example, >> what is default value for --wpc? >> --wpc=DOUBLE // Water precorrection coefficients >> Thanks. >> Best regards >> Guangming >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ucabba1 at ucl.ac.uk Thu Jun 18 06:51:25 2015 From: ucabba1 at ucl.ac.uk (Ben Champion) Date: Thu, 18 Jun 2015 11:51:25 +0100 Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <5582A2AD.7090002@ucl.ac.uk> Hi Cyril, I have a preference for the second option. Thanks, Ben On 17/06/15 13:05, Cyril Mory wrote: > Dear RTK users, > > The first RTK training is being planned at this very moment. It should > take place in November in Lyon, and be hosted by Kitware. The exact > date has not yet been decided, but will be available soon. > > We need your help to decide what to focus this training on. The choice > is mainly between two options: > - if most trainees want to learn how to use RTK, then we will focus on > the command-line tools and on python + Simple RTK > - if most trainees want to learn how to develop within RTK, modify and > enrich it, then we will focus on software architecture, detailed > filter description, ITK pipeline management, CUDA filters, etc... > > Please let us know which of these choices would best suit your needs. > > Looking forward, > Cyril > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From simon.rit at creatis.insa-lyon.fr Thu Jun 18 12:36:55 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 18 Jun 2015 18:36:55 +0200 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi, I have slightly modified the help following your suggestion: https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 Simon On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang wrote: > Thanks for the help Chao. yes, just one example. we can make it like: > --wpc=DOUBLE // Water precorrection coefficients, and turn it > off by default. > But anyway, maybe only my opinion, for other user in the community, maybe > it is enough. > Thanks again > Regards Guangming > > *Guangming Zang (Alex)* > *King Abdullah University of Science and Technology(KAUST)* > *University of Chinese Academy of Sciences(UCAS)* > > > > > 2015-06-17 19:47 GMT+03:00 Chao Wu : > >> In rtkGgoFunction.h >> >> // Water precorrection >> if(args_info.wpc_given) >> { >> std::vector coeffs; >> coeffs.assign(args_info.wpc_arg, >> args_info.wpc_arg+args_info.wpc_given); >> reader->SetWaterPrecorrectionCoefficients(coeffs); >> } >> >> In rtkProjectionsReader.txx >> >> // Water coefficients >> if(m_WaterPrecorrectionCoefficients.size() != 0) >> { >> >> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >> m_WaterPrecorrectionFilter->SetInput(output); >> output->ReleaseDataFlagOn(); >> output = m_WaterPrecorrectionFilter->GetOutput(); >> } >> >> >> So it means by default wpc coefficients are not set at all and thus WPC >> filter is bypassed. >> >> Regards, Chao >> >> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >> >>> Hey all, >>> i prefer first one, i.e, more detailed command line explanation. i >>> wanna compare RTK results to mine, however, sometime the command line and >>> flags are not clear . >>> For example, in lastest rtkfdk command, for projection images >>> preprocessing, so many command line there. >>> And some are turned off by default while some are not. For example, >>> what is default value for --wpc? >>> --wpc=DOUBLE // Water precorrection coefficients >>> Thanks. >>> Best regards >>> Guangming >>> *Guangming Zang (Alex)* >>> *King Abdullah University of Science and Technology(KAUST)* >>> *University of Chinese Academy of Sciences(UCAS)* >>> >>> >>> >>> >>> ------------------------------ >>> This message and its contents, including attachments are intended solely >>> for the original recipient. If you are not the intended recipient or have >>> received this message in error, please notify me immediately and delete >>> this message from your computer system. Any unauthorized use or >>> distribution is prohibited. Please consider the environment before printing >>> this email. >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > > ------------------------------ > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before printing > this email. > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guangming.zang at kaust.edu.sa Thu Jun 18 13:36:53 2015 From: guangming.zang at kaust.edu.sa (Guangming Zang) Date: Thu, 18 Jun 2015 20:36:53 +0300 Subject: [Rtk-users] RTK training In-Reply-To: References: Message-ID: Hi Simon Thanks for the help. Regards Guangming *Guangming Zang (Alex)* *King Abdullah University of Science and Technology(KAUST)* *University of Chinese Academy of Sciences(UCAS)* 2015-06-18 19:36 GMT+03:00 Simon Rit : > Hi, > I have slightly modified the help following your suggestion: > > https://github.com/SimonRit/RTK/commit/a48ad7e325f12246d6730aefbf1254b1cc431dd1 > Simon > > On Wed, Jun 17, 2015 at 8:43 PM, Guangming Zang < > guangming.zang at kaust.edu.sa> wrote: > >> Thanks for the help Chao. yes, just one example. we can make it like: >> --wpc=DOUBLE // Water precorrection coefficients, and turn it >> off by default. >> But anyway, maybe only my opinion, for other user in the community, maybe >> it is enough. >> Thanks again >> Regards Guangming >> >> *Guangming Zang (Alex)* >> *King Abdullah University of Science and Technology(KAUST)* >> *University of Chinese Academy of Sciences(UCAS)* >> >> >> >> >> 2015-06-17 19:47 GMT+03:00 Chao Wu : >> >>> In rtkGgoFunction.h >>> >>> // Water precorrection >>> if(args_info.wpc_given) >>> { >>> std::vector coeffs; >>> coeffs.assign(args_info.wpc_arg, >>> args_info.wpc_arg+args_info.wpc_given); >>> reader->SetWaterPrecorrectionCoefficients(coeffs); >>> } >>> >>> In rtkProjectionsReader.txx >>> >>> // Water coefficients >>> if(m_WaterPrecorrectionCoefficients.size() != 0) >>> { >>> >>> m_WaterPrecorrectionFilter->SetCoefficients(m_WaterPrecorrectionCoefficients); >>> m_WaterPrecorrectionFilter->SetInput(output); >>> output->ReleaseDataFlagOn(); >>> output = m_WaterPrecorrectionFilter->GetOutput(); >>> } >>> >>> >>> So it means by default wpc coefficients are not set at all and thus WPC >>> filter is bypassed. >>> >>> Regards, Chao >>> >>> 2015-06-17 18:16 GMT+02:00 Guangming Zang : >>> >>>> Hey all, >>>> i prefer first one, i.e, more detailed command line explanation. i >>>> wanna compare RTK results to mine, however, sometime the command line and >>>> flags are not clear . >>>> For example, in lastest rtkfdk command, for projection images >>>> preprocessing, so many command line there. >>>> And some are turned off by default while some are not. For example, >>>> what is default value for --wpc? >>>> --wpc=DOUBLE // Water precorrection coefficients >>>> Thanks. >>>> Best regards >>>> Guangming >>>> *Guangming Zang (Alex)* >>>> *King Abdullah University of Science and Technology(KAUST)* >>>> *University of Chinese Academy of Sciences(UCAS)* >>>> >>>> >>>> >>>> >>>> ------------------------------ >>>> This message and its contents, including attachments are intended >>>> solely for the original recipient. If you are not the intended recipient or >>>> have received this message in error, please notify me immediately and >>>> delete this message from your computer system. Any unauthorized use or >>>> distribution is prohibited. Please consider the environment before printing >>>> this email. >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> >> ------------------------------ >> This message and its contents, including attachments are intended solely >> for the original recipient. If you are not the intended recipient or have >> received this message in error, please notify me immediately and delete >> this message from your computer system. Any unauthorized use or >> distribution is prohibited. Please consider the environment before printing >> this email. >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Jun 19 02:46:47 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 19 Jun 2015 08:46:47 +0200 Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: <551BE8E3.10903@kitware.com> References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier wrote: > Hi Mathieu, > > It's actually a little more complicated than just modifying the CMakeLists > files, because we define a new image type itk::CudaImage which is not > currently handled by the wrapping. We'll see if we can add this soon. > > Julien > > > On 30/03/2015 11:14, Mathieu DUPONT wrote: > >> Hi rtk-users/developpers, >> >> >> I want to use RTK in a python workflow, and for this I want to use >> CudaFDKConeBeamReconstructionFilter class. For this, I created a json file >> in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file >> with this email. But when I try to build, I get an error about "cuda.h" >> file missing. >> >> >> " >> [ 65%] Building CXX object >> Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> cd >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src >> && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS >> -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC >> -I/data/mdupont/Compile/openrtk/bin-rtk >> -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include >> -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms >> -I/data/soft/include/ITK-4.7 >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include >> -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include >> -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o >> CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o >> -c /data/mdupont/Compile/openrtk >> > /bin-rt > > k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx > >> In file included from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, >> from >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, >> from >> /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, >> from >> /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: >> /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: >> fatal error: cuda.h: No such file or directory >> " >> >> How to modify cmakelists files in order to use cuda classes with >> SimpleRTK ? >> >> Thanks for your help, >> Mathieu Dupont >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 03:30:30 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 09:30:30 +0200 (CEST) Subject: [Rtk-users] RTK training In-Reply-To: <55816290.1010807@uclouvain.be> References: <55816290.1010807@uclouvain.be> Message-ID: <1983868238.1072046.1434958230059.JavaMail.zimbra@cppm.in2p3.fr> Hi Cyril, I prefer the second one, thanks Mathieu ----- Original Message ----- From: "Cyril Mory" To: rtk-users at openrtk.org Sent: Wednesday, June 17, 2015 2:05:36 PM Subject: [Rtk-users] RTK training Dear RTK users, The first RTK training is being planned at this very moment. It should take place in November in Lyon, and be hosted by Kitware. The exact date has not yet been decided, but will be available soon. We need your help to decide what to focus this training on. The choice is mainly between two options: - if most trainees want to learn how to use RTK, then we will focus on the command-line tools and on python + Simple RTK - if most trainees want to learn how to develop within RTK, modify and enrich it, then we will focus on software architecture, detailed filter description, ITK pipeline management, CUDA filters, etc... Please let us know which of these choices would best suit your needs. Looking forward, Cyril _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users From p.jin at amc.uva.nl Mon Jun 22 06:48:50 2015 From: p.jin at amc.uva.nl (P. Jin) Date: Mon, 22 Jun 2015 10:48:50 +0000 Subject: [Rtk-users] installation problem rtk Message-ID: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Dear rtk-users/developers, In my installation I encountered some problems. I have installed itk properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, the options I made look like this: BUILD_APPLICATIONS ON BUILD_DOXYGEN OFF BUILD_EXAMPLES ON BUILD_SHARED_LIBS ON BUILD_SIMPLERTK OFF BUILD_TESTING ON CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local/rtk CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CUDA_HOST_COMPILER /Applications/Xcode.app/Contents/Developer/To CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 CUDA_USE_STATIC_CUDA_RUNTIME ON DEFAULT_GCC /usr/local/bin/gcc EXACT_GCC EXACT_GCC-NOTFOUND EXACT_GCC2 EXACT_GCC2-NOTFOUND GENGETOPT GENGETOPT-NOTFOUND ITK_DIR /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB RTK_USE_CUDA ON RTK_USE_OPENCL OFF when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck at [ 23%] Building CXX object code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o In file included from /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: In file included from /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use of undeclared identifier '__signbitd'; did you mean 'signbit'? if (__signbitd(a)) ^~~~~~~~~~ signbit /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: note: 'signbit' declared here signbit(_A1 __x) _NOEXCEPT ^ 1 error generated. make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was installed), the make process was stuck at [ 20%] Building NVCC (Device) object code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X. CMake Error at cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 (message): Error generating /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o make[2]: *** [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] Error 1 make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 make: *** [all] Error 2 Does anyone have an idea about how to fix it? BTW, an warning message came up while I was configuring the cmake, which is "gengetopt not found". Thanks in advance! best regards, Peng ________________________________ AMC Disclaimer : http://www.amc.nl/disclaimer ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdupont at cppm.in2p3.fr Mon Jun 22 07:56:46 2015 From: mdupont at cppm.in2p3.fr (Mathieu DUPONT) Date: Mon, 22 Jun 2015 13:56:46 +0200 (CEST) Subject: [Rtk-users] Hi rtk-users/developpers, In-Reply-To: References: <674041074.143852.1427706889580.JavaMail.zimbra@cppm.in2p3.fr> <551BE8E3.10903@kitware.com> Message-ID: <1318490227.1206321.1434974206704.JavaMail.zimbra@cppm.in2p3.fr> Hi Simon, thanks for your job, i was able to compile (with a minor problem, see https://github.com/SimonRit/RTK/pull/13) and test your example with python 2.7 (provided by anaconda) and it works. Regards, Mathieu ----- Original Message ----- From: "Simon Rit" To: "Julien Jomier" Cc: "Mathieu DUPONT" , rtk-users at public.kitware.com Sent: Friday, June 19, 2015 8:46:47 AM Subject: Re: [Rtk-users] Hi rtk-users/developpers, Hi Mathieu, That was not easy but I have pushed a fix that should allow the use of CUDA in SimpleRTK. I have included your json file in the repository and added an example that works for me: https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/Examples/RTKFirstCudaReconstruction.py It would be great if some other users can test it. Simon On Wed, Apr 1, 2015 at 2:47 PM, Julien Jomier < julien.jomier at kitware.com > wrote: Hi Mathieu, It's actually a little more complicated than just modifying the CMakeLists files, because we define a new image type itk::CudaImage which is not currently handled by the wrapping. We'll see if we can add this soon. Julien On 30/03/2015 11:14, Mathieu DUPONT wrote:
Hi rtk-users/developpers, I want to use RTK in a python workflow, and for this I want to use CudaFDKConeBeamReconstructionFilter class. For this, I created a json file in "utilities/SimpleRTK/Code/BasicFilters/json" directory. I join this file with this email. But when I try to build, I get an error about "cuda.h" file missing. " [ 65%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o cd /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src && /usr/bin/c++ -DSimpleRTKBasicFilters1_EXPORTS -DSimpleRTKBasicFilters_EXPORTS -fPIC -fPIC -I/data/mdupont/Compile/openrtk/bin-rtk -I/image/mdupont/soft/RTK/utilities/ITKCudaCommon/include -I/image/mdupont/soft/RTK/code -I/data/soft/include/ITK-4.7/Algorithms -I/data/soft/include/ITK-4.7 -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/Registration -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/IO/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/include -I/data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/Common/include -I/image/mdupont/soft/RTK/utilities/SimpleRTK/Code/BasicFilters/src -o CMakeFiles/SimpleRTKBasicFilters1.dir/srtkCudaFDKConeBeamReconstructionFilter.cxx.o -c /data/mdupont/Compile/openrtk /bin-rt k/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx
In file included from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImageDataManager.h:25, from /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaImage.h:22, from /image/mdupont/soft/RTK/code/rtkCudaFDKWeightProjectionFilter.h:25, from /image/mdupont/soft/RTK/code/rtkCudaFDKConeBeamReconstructionFilter.h:23, from /data/mdupont/Compile/openrtk/bin-rtk/SimpleRTK-build/Code/BasicFilters/src/srtkCudaFDKConeBeamReconstructionFilter.cxx:34: /image/mdupont/soft/RTK/utilities/ITKCudaCommon/include/itkCudaUtil.h:33: fatal error: cuda.h: No such file or directory " How to modify cmakelists files in order to use cuda classes with SimpleRTK ? Thanks for your help, Mathieu Dupont _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 07:23:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 13:23:10 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> Message-ID: Hi Jin, Thanks for the report and sorry you're facing difficulties. Point-by-point: - the gengetopt message has been removed, it was a trace of debugging, - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is now accounted for with this fix , - the last problem is due to this fix by Julien Jomier. Remove the lines he's added and that should compile (it does on my mac with cuda 7). Please confirm and I'll then check with Julien if / when this is required. Simon On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > Dear rtk-users/developers, > > > > In my installation I encountered some problems. I have installed itk > properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the > CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in > /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, > the options I made look like this: > > > > BUILD_APPLICATIONS ON > > > BUILD_DOXYGEN OFF > > > BUILD_EXAMPLES ON > > > BUILD_SHARED_LIBS ON > > > BUILD_SIMPLERTK OFF > > > BUILD_TESTING ON > > > CMAKE_BUILD_TYPE > > > CMAKE_INSTALL_PREFIX /usr/local/rtk > > > CMAKE_OSX_ARCHITECTURES > > > CMAKE_OSX_DEPLOYMENT_TARGET > > > CMAKE_OSX_SYSROOT > > > CUDA_HOST_COMPILER > /Applications/Xcode.app/Contents/Developer/To > > CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND > > > CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 > > > CUDA_USE_STATIC_CUDA_RUNTIME ON > > > DEFAULT_GCC /usr/local/bin/gcc > > > EXACT_GCC EXACT_GCC-NOTFOUND > > > EXACT_GCC2 EXACT_GCC2-NOTFOUND > > > GENGETOPT GENGETOPT-NOTFOUND > > > ITK_DIR > /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB > > RTK_USE_CUDA ON > > > RTK_USE_OPENCL OFF > > > > > > > > > > > when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck > at > > > > [ 23%] Building CXX object > code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o > > In file included from > /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: > > In file included from /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: > > In file included from > /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: > > /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use > of > > undeclared identifier '__signbitd'; did you mean 'signbit'? > > if (__signbitd(a)) > > ^~~~~~~~~~ > > signbit > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: > note: > > 'signbit' declared here > > signbit(_A1 __x) _NOEXCEPT > > ^ > > 1 error generated. > > make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was > installed), the make process was stuck at > > > > [ 20%] Building NVCC (Device) object > code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > nvcc fatal : GNU C/C++ compiler is no longer supported as a host > compiler on Mac OS X. > > CMake Error at > cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 > (message): > > Error generating > > > /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o > > > > > > make[2]: *** > [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] > Error 1 > > make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 > > make: *** [all] Error 2 > > > > Does anyone have an idea about how to fix it? > > > > BTW, an warning message came up while I was configuring the cmake, which > is "gengetopt not found?. > > > > Thanks in advance! > > > > best regards, > > Peng > > > > > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Calliess at gmx.de Tue Jun 23 07:30:41 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 13:30:41 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 08:00:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 14:00:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Hi, I'm not sure I understand exactly what you mean but it seems to me that yes, it should, i.e. - the source position is set according to the description you have given in your ThreeDCircularProjectionGeometry. Computation of the source position is done in ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. - idem for the pixel position of your detector. Computation is a bit more subtle because it uses a matrix, ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix The whole thing is for example done in rtk::JosephForwardProjectionImageFilter Are you asking because you've observed something unexpected? Simon On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" wrote: > Hello, > I've got a questions regarding to the forward projectors for the S-ART > reconstruction. > Let's say there are some xray projection images from an xray machine taken > with a circular trjectory (cone beam) > The perspective view for these real projection images have been taken into > account, of course. > The forward projector creates a virtual projection image of the volume to be > reconstructed. When this forward projection > takes place does the forward projector also take into account the > perspective view of the real CT system ? > > Let's say we have a simple raycast forward projector. > The geometry (focus, object, detector) are all given in real world units > where the object's center is (0, 0, 0). > By "real world units" I mean the physical dimensions from the CT system. For > instance, if the distance between > the object's center and the xray-source is 500mm, the the xray-source > position is (0,0, -500.0). > > So the virtual projection image is created as follows: > 1: setup ray from xray-source to the current detector pixel > 2: determine entry point and exit point of this ray with the physical > bounding volume > 3: sample the volume along the ray, from entry point to exit point > > Does these steps per se include the perspective view ? Since the geomtry > (position of focus object detector) for the reconstruction is modeled > to imitate the real CT system's geometry, it should ? > > > > best regards, > Robert > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:04:21 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:04:21 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:08:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:08:00 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: No, the isocenter is the center of rotation which is also used as the origin of the coordinate system of the tomography in RTK. Simon On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" wrote: > Hello Simon, > thank you for your fast reply. It was a question in general. > I had a look at the ThreeDCircularProjectionGeometry file. But generally > it should be the same as I described in my email. Also for the > joseph projector, spanning the ray from source to detector position (pixel). > This automatically gives divergent rays. > > I have another question. Is the isocenter the center of the object ? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > Hi, > I'm not sure I understand exactly what you mean but it seems to me > that yes, it should, i.e. > - the source position is set according to the description you have > given in your ThreeDCircularProjectionGeometry. Computation of the > source position is done in > ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. > - idem for the pixel position of your detector. Computation is a bit > more subtle because it uses a matrix, > ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix > The whole thing is for example done in > rtk::JosephForwardProjectionImageFilter > Are you asking because you've observed something unexpected? > Simon > > On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" > wrote: >> Hello, >> I've got a questions regarding to the forward projectors for the S-ART >> reconstruction. >> Let's say there are some xray projection images from an xray machine taken >> with a circular trjectory (cone beam) >> The perspective view for these real projection images have been taken into >> account, of course. >> The forward projector creates a virtual projection image of the volume to >> be >> reconstructed. When this forward projection >> takes place does the forward projector also take into account the >> perspective view of the real CT system ? >> >> Let's say we have a simple raycast forward projector. >> The geometry (focus, object, detector) are all given in real world units >> where the object's center is (0, 0, 0). >> By "real world units" I mean the physical dimensions from the CT system. >> For >> instance, if the distance between >> the object's center and the xray-source is 500mm, the the xray-source >> position is (0,0, -500.0). >> >> So the virtual projection image is created as follows: >> 1: setup ray from xray-source to the current detector pixel >> 2: determine entry point and exit point of this ray with the physical >> bounding volume >> 3: sample the volume along the ray, from entry point to exit point >> >> Does these steps per se include the perspective view ? Since the geomtry >> (position of focus object detector) for the reconstruction is modeled >> to imitate the real CT system's geometry, it should ? >> >> >> >> best regards, >> Robert >> >> >> >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From Robert.Calliess at gmx.de Tue Jun 23 09:12:12 2015 From: Robert.Calliess at gmx.de (=?UTF-8?Q?=22Robert_Callie=C3=9F=22?=) Date: Tue, 23 Jun 2015 15:12:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Jun 23 09:31:12 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 23 Jun 2015 15:31:12 +0200 Subject: [Rtk-users] forward projectors - considering perspective view ? In-Reply-To: References: Message-ID: Indeed, I have taken it as an assertion! Yes, since the source position is the same for all pixels of a projection image, it gives divergent rays focused on the source position. Simon On Tue, Jun 23, 2015 at 3:12 PM, "Robert Callie?" wrote: > Hello, > thank you for the answer. I wanted to get a short feedback to the last part > of my email. > I guess I missed the "?" . > >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. ?? > ?? > > best regards, > Robert > > Gesendet: Dienstag, 23. Juni 2015 um 15:08 Uhr > > Von: "Simon Rit" > An: "Robert Callie?" > Cc: "rtk-users at public.kitware.com" > Betreff: Re: [Rtk-users] forward projectors - considering perspective view ? > No, the isocenter is the center of rotation which is also used as the > origin of the coordinate system of the tomography in RTK. > Simon > > On Tue, Jun 23, 2015 at 3:04 PM, "Robert Callie?" > wrote: >> Hello Simon, >> thank you for your fast reply. It was a question in general. >> I had a look at the ThreeDCircularProjectionGeometry file. But generally >> it should be the same as I described in my email. Also for the >> joseph projector, spanning the ray from source to detector position >> (pixel). >> This automatically gives divergent rays. >> >> I have another question. Is the isocenter the center of the object ? >> >> best regards, >> Robert >> >> Gesendet: Dienstag, 23. Juni 2015 um 14:00 Uhr >> Von: "Simon Rit" >> An: "Robert Callie?" >> Cc: "rtk-users at public.kitware.com" >> Betreff: Re: [Rtk-users] forward projectors - considering perspective view >> ? >> Hi, >> I'm not sure I understand exactly what you mean but it seems to me >> that yes, it should, i.e. >> - the source position is set according to the description you have >> given in your ThreeDCircularProjectionGeometry. Computation of the >> source position is done in >> ThreeDCircularProjectionGeometry::GetSourcePosition, you can check. >> - idem for the pixel position of your detector. Computation is a bit >> more subtle because it uses a matrix, >> >> ThreeDCircularProjectionGeometry::GetProjectionCoordinatesToFixedSystemMatrix >> The whole thing is for example done in >> rtk::JosephForwardProjectionImageFilter >> Are you asking because you've observed something unexpected? >> Simon >> >> On Tue, Jun 23, 2015 at 1:30 PM, "Robert Callie?" >> wrote: >>> Hello, >>> I've got a questions regarding to the forward projectors for the S-ART >>> reconstruction. >>> Let's say there are some xray projection images from an xray machine >>> taken >>> with a circular trjectory (cone beam) >>> The perspective view for these real projection images have been taken >>> into >>> account, of course. >>> The forward projector creates a virtual projection image of the volume to >>> be >>> reconstructed. When this forward projection >>> takes place does the forward projector also take into account the >>> perspective view of the real CT system ? >>> >>> Let's say we have a simple raycast forward projector. >>> The geometry (focus, object, detector) are all given in real world units >>> where the object's center is (0, 0, 0). >>> By "real world units" I mean the physical dimensions from the CT system. >>> For >>> instance, if the distance between >>> the object's center and the xray-source is 500mm, the the xray-source >>> position is (0,0, -500.0). >>> >>> So the virtual projection image is created as follows: >>> 1: setup ray from xray-source to the current detector pixel >>> 2: determine entry point and exit point of this ray with the physical >>> bounding volume >>> 3: sample the volume along the ray, from entry point to exit point >>> >>> Does these steps per se include the perspective view ? Since the geomtry >>> (position of focus object detector) for the reconstruction is modeled >>> to imitate the real CT system's geometry, it should ? >>> >>> >>> >>> best regards, >>> Robert >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From ieee.safdary at gmail.com Wed Jun 24 03:48:46 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Wed, 24 Jun 2015 12:18:46 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <557FC4B2.5060504@creatis.insa-lyon.fr> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < cyril.mory at creatis.insa-lyon.fr> wrote: > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > regards > > > > safdari > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > >> Hi Safdary, >> >> >> >> Again, please cc rtk-users at openrtk.org when you send your email, since >> other users (much better experts than me!) can give us any suggestions. >> >> >> >> Thanks. >> >> >> >> Yang >> >> >> >> *From:* Yang K Park [mailto:theday79 at gmail.com] >> *Sent:* Monday, June 15, 2015 10:37 AM >> *To:* 'safdary mohsen' >> *Cc:* rtk-users at openrtk.org >> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Safdary, >> >> >> >> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >> works for you. >> >> >> >> The example of the command line would be: >> >> >> >> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >> -127.875,29.5,-127.875 --hardware cuda >> >> >> >> If it works for your image, then you can mimic the original rtkfdk code >> to make your own one. >> >> >> >> Good luck! >> >> >> >> Yang >> >> >> >> >> >> >> >> >> >> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >> ] >> *Sent:* Saturday, June 13, 2015 11:58 PM >> *To:* Yang K Park >> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when >> rtk use cuda >> >> >> >> Hi Yang >> >> >> >> I have tried to adjust the window/level to see something inside of the >> image but all pixels set to zero. >> >> *My code is:* >> >> #define USE_CUDA >> >> int main(int , char **) >> >> { >> >> //// variable >> >> const unsigned int Dimension = 3; >> >> typedef float OutputPixelType; >> >> #ifdef USE_CUDA >> >> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >> >> #else >> >> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> >> #endif >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Generate file names of projections >> >> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >> RegularExpressionSeriesFileNames::New(); >> >> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >> >> names->SetRegularExpression(std::string("Proj_.*.hnd")); >> >> >> //////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //// geometry >> >> // Defines the RTK geometry object >> >> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> >> GeometryType::Pointer geometry = GeometryType::New(); >> >> // Projection matrices >> >> unsigned int numberOfProjections = 86; >> >> unsigned int firstAngle = 0; >> >> unsigned int angularArc = 360; >> >> unsigned int sid = 1000; >> >> unsigned int sdd = 1200; >> >> int isox = 0; >> >> int isoy = 0 ; >> >> for(unsigned int noProj=0; noProj> >> { >> >> double angle = (float)firstAngle + (float)noProj * angularArc / (float >> )numberOfProjections; >> >> geometry->AddProjection(sid, >> >> sdd, >> >> angle, >> >> isox, >> >> isoy); >> >> } >> >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> // Projections reader >> >> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> >> reader->SetFileNames(names->GetFileNames()); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> // Create reconstructed image //////////////////////////////////// >> >> typedef rtk::ConstantImageSource< OutputImageType > >> ConstantImageSourceType; >> >> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >> ::New(); >> >> ConstantImageSourceType::PointType origin; >> >> ConstantImageSourceType::SizeType sizeOutput; >> >> ConstantImageSourceType::SpacingType spacing; >> >> origin[0] = -127.75; >> >> origin[1] = -127.75; >> >> origin[2] = -127.75; >> >> >> >> sizeOutput[0] = 512; >> >> sizeOutput[1] = 512; >> >> sizeOutput[2] = 512; >> >> spacing[0] = .5; >> >> spacing[1] = .5; >> >> spacing[2] = .5; >> >> ImageSource->SetOrigin( origin ); >> >> ImageSource->SetSpacing( spacing ); >> >> ImageSource->SetSize( sizeOutput ); >> >> ImageSource->SetConstant( 0. ); >> >> // getchar(); ////////////////////////////////////// >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> >> std::cout << "Performing reconstruction" << std::endl; >> >> // FDK reconstruction filtering >> >> // FDK reconstruction filtering >> >> #ifdef USE_CUDA >> >> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> >> #elif USE_OPENCL >> >> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >> >> #else >> >> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >> >> #endif >> >> FDKType::Pointer feldkamp = FDKType::New(); >> >> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >> >> feldkamp->SetInput( 1, reader->GetOutput()); >> >> feldkamp->SetGeometry( geometry); >> >> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >> >> std::cout << "Writing output image" << std::endl; >> >> // Writer >> >> typedef itk::Image< float, 3 > ImageType; >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "output11.mha" ); >> >> writer->SetInput( feldkamp->GetOutput() ); >> >> writer->Update(); >> >> >> >> getchar(); >> >> return 0; >> >> } >> > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Jun 24 08:13:33 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 24 Jun 2015 14:13:33 +0200 Subject: [Rtk-users] installation problem rtk In-Reply-To: <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> References: <7BCE84931D45264799F13B4A4968B3FE1C4900FD@MS-APP-804A.amc.intra> <1EC2D3A4-3404-4412-8E03-C585AD99A274@amc.uva.nl> Message-ID: Great, a fix has been pushed that limits Julien's patch to windows. Thanks again for the report, Simon On Tue, Jun 23, 2015 at 9:48 PM, P. Jin wrote: > Hi Simon, > > Thanks for your fast response, it worked. > > Best regards, > > Peng > > On 23 Jun 2015, at 13:23, Simon Rit > wrote: > > Hi Jin, > Thanks for the report and sorry you're facing difficulties. > Point-by-point: > - the gengetopt message has been removed, it was a trace of debugging, > - nvidia forbids use of gcc with cuda 7.0 which I believe is new. This is > now accounted for with this fix > > , > - the last problem is due to this fix > > by Julien Jomier. Remove the lines he's added and that should compile (it > does on my mac with cuda 7). Please confirm and I'll then check with Julien > if / when this is required. > Simon > > > On Mon, Jun 22, 2015 at 12:48 PM, P. Jin wrote: > >> Dear rtk-users/developers, >> >> >> >> In my installation I encountered some problems. I have installed itk >> properly, gcc-4.9 and cuda-7.0 on mac os x 10.10. We create the >> CUDA_BIN_PATH which is the directory of nvcc. The gcc-4.9 was installed in >> /usr/local/bin, and the default gcc is in /usr/bin. In the cmake process, >> the options I made look like this: >> >> >> >> BUILD_APPLICATIONS ON >> >> >> BUILD_DOXYGEN OFF >> >> >> BUILD_EXAMPLES ON >> >> >> BUILD_SHARED_LIBS ON >> >> >> BUILD_SIMPLERTK OFF >> >> >> BUILD_TESTING ON >> >> >> CMAKE_BUILD_TYPE >> >> >> CMAKE_INSTALL_PREFIX /usr/local/rtk >> >> >> CMAKE_OSX_ARCHITECTURES >> >> >> CMAKE_OSX_DEPLOYMENT_TARGET >> >> >> CMAKE_OSX_SYSROOT >> >> >> CUDA_HOST_COMPILER >> /Applications/Xcode.app/Contents/Developer/To >> >> CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND >> >> >> CUDA_TOOLKIT_ROOT_DIR /Developer/NVIDIA/CUDA-7.0 >> >> >> CUDA_USE_STATIC_CUDA_RUNTIME ON >> >> >> DEFAULT_GCC /usr/local/bin/gcc >> >> >> EXACT_GCC EXACT_GCC-NOTFOUND >> >> >> EXACT_GCC2 EXACT_GCC2-NOTFOUND >> >> >> GENGETOPT GENGETOPT-NOTFOUND >> >> >> ITK_DIR >> /Users/pjin/Develop/InsightToolkit-4.7.2/ITKB >> >> RTK_USE_CUDA ON >> >> >> RTK_USE_OPENCL OFF >> >> >> >> >> >> >> >> >> >> >> when i specified DEFAULT_GCC is /usr/bin/gcc, the make process was stuck >> at >> >> >> >> [ 23%] Building CXX object >> code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaCropImageFilter.cxx:20: >> >> In file included from >> /Users/pjin/Develop/RTK/code/rtkCudaUtilities.hcu:24: >> >> In file included from >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.h:9822: >> >> /Developer/NVIDIA/CUDA-7.0/include/math_functions.hpp:3208:7: error: use >> of >> >> undeclared identifier '__signbitd'; did you mean 'signbit'? >> >> if (__signbitd(a)) >> >> ^~~~~~~~~~ >> >> signbit >> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:1: >> note: >> >> 'signbit' declared here >> >> signbit(_A1 __x) _NOEXCEPT >> >> ^ >> >> 1 error generated. >> >> make[2]: *** [code/CMakeFiles/rtkcuda.dir/rtkCudaCropImageFilter.cxx.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> when i specified DEFAULT_GCC to /usr/local/bin/gcc (where the gcc-4.9 was >> installed), the make process was stuck at >> >> >> >> [ 20%] Building NVCC (Device) object >> code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> nvcc fatal : GNU C/C++ compiler is no longer supported as a host >> compiler on Mac OS X. >> >> CMake Error at >> cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o.cmake:207 >> (message): >> >> Error generating >> >> >> /Users/pjin/Develop/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o >> >> >> >> >> >> make[2]: *** >> [code/CMakeFiles/cuda_compile.dir/cuda_compile_generated_rtkCudaAverageOutOfROIImageFilter.cu.o] >> Error 1 >> >> make[1]: *** [code/CMakeFiles/rtkcuda.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Does anyone have an idea about how to fix it? >> >> >> >> BTW, an warning message came up while I was configuring the cmake, which >> is "gengetopt not found?. >> >> >> >> Thanks in advance! >> >> >> >> best regards, >> >> Peng >> >> >> >> >> >> ------------------------------ >> >> AMC Disclaimer : http://www.amc.nl/disclaimer >> ------------------------------ >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > ------------------------------ > > AMC Disclaimer : http://www.amc.nl/disclaimer > ------------------------------ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Wed Jun 24 09:21:49 2015 From: theday79 at gmail.com (Yang-Kyun Park) Date: Wed, 24 Jun 2015 09:21:49 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > Hi > > I cheched projectionreader and i abtained that all projection are readed. > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > ) > > and > > geometry is work for cpu mode means outputs are ok . > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > >> Hi Safdary, >> >> Just to be sure: have you tried reconstructing in a larger volume >> (something really huge), just to make sure you are not trying to >> reconstruct some portion of space where, indeed, there is nothing ? >> You can try that easily, just replace your spacing, dimension and origin >> with >> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >> in your rtkfdk command line. >> >> Cyril >> >> >> On 06/15/2015 05:19 PM, safdary mohsen wrote: >> >> Hi Yang >> >> >> I am use rtkfdk.exe but the results are same as my code, >> >> means all pixels are zero!!! >> >> >> regards >> >> >> >> safdari >> >> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >> >>> Hi Safdary, >>> >>> >>> >>> Again, please cc rtk-users at openrtk.org when you send your email, since >>> other users (much better experts than me!) can give us any suggestions. >>> >>> >>> >>> Thanks. >>> >>> >>> >>> Yang >>> >>> >>> >>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>> *Sent:* Monday, June 15, 2015 10:37 AM >>> *To:* 'safdary mohsen' >>> *Cc:* rtk-users at openrtk.org >>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Safdary, >>> >>> >>> >>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>> works for you. >>> >>> >>> >>> The example of the command line would be: >>> >>> >>> >>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>> -127.875,29.5,-127.875 --hardware cuda >>> >>> >>> >>> If it works for your image, then you can mimic the original rtkfdk code >>> to make your own one. >>> >>> >>> >>> Good luck! >>> >>> >>> >>> Yang >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>> ] >>> *Sent:* Saturday, June 13, 2015 11:58 PM >>> *To:* Yang K Park >>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>> when rtk use cuda >>> >>> >>> >>> Hi Yang >>> >>> >>> >>> I have tried to adjust the window/level to see something inside of the >>> image but all pixels set to zero. >>> >>> *My code is:* >>> >>> #define USE_CUDA >>> >>> int main(int , char **) >>> >>> { >>> >>> //// variable >>> >>> const unsigned int Dimension = 3; >>> >>> typedef float OutputPixelType; >>> >>> #ifdef USE_CUDA >>> >>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>> >>> #else >>> >>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> >>> #endif >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Generate file names of projections >>> >>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>> RegularExpressionSeriesFileNames::New(); >>> >>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>> >>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>> >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //// geometry >>> >>> // Defines the RTK geometry object >>> >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> >>> GeometryType::Pointer geometry = GeometryType::New(); >>> >>> // Projection matrices >>> >>> unsigned int numberOfProjections = 86; >>> >>> unsigned int firstAngle = 0; >>> >>> unsigned int angularArc = 360; >>> >>> unsigned int sid = 1000; >>> >>> unsigned int sdd = 1200; >>> >>> int isox = 0; >>> >>> int isoy = 0 ; >>> >>> for(unsigned int noProj=0; noProj>> >>> { >>> >>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>> )numberOfProjections; >>> >>> geometry->AddProjection(sid, >>> >>> sdd, >>> >>> angle, >>> >>> isox, >>> >>> isoy); >>> >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> // Projections reader >>> >>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileNames(names->GetFileNames()); >>> >>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> // Create reconstructed image //////////////////////////////////// >>> >>> typedef rtk::ConstantImageSource< OutputImageType > >>> ConstantImageSourceType; >>> >>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>> ::New(); >>> >>> ConstantImageSourceType::PointType origin; >>> >>> ConstantImageSourceType::SizeType sizeOutput; >>> >>> ConstantImageSourceType::SpacingType spacing; >>> >>> origin[0] = -127.75; >>> >>> origin[1] = -127.75; >>> >>> origin[2] = -127.75; >>> >>> >>> >>> sizeOutput[0] = 512; >>> >>> sizeOutput[1] = 512; >>> >>> sizeOutput[2] = 512; >>> >>> spacing[0] = .5; >>> >>> spacing[1] = .5; >>> >>> spacing[2] = .5; >>> >>> ImageSource->SetOrigin( origin ); >>> >>> ImageSource->SetSpacing( spacing ); >>> >>> ImageSource->SetSize( sizeOutput ); >>> >>> ImageSource->SetConstant( 0. ); >>> >>> // getchar(); ////////////////////////////////////// >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> >>> std::cout << "Performing reconstruction" << std::endl; >>> >>> // FDK reconstruction filtering >>> >>> // FDK reconstruction filtering >>> >>> #ifdef USE_CUDA >>> >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> >>> #elif USE_OPENCL >>> >>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>> >>> #else >>> >>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; >>> >>> #endif >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> >>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>> >>> feldkamp->SetInput( 1, reader->GetOutput()); >>> >>> feldkamp->SetGeometry( geometry); >>> >>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>> >>> std::cout << "Writing output image" << std::endl; >>> >>> // Writer >>> >>> typedef itk::Image< float, 3 > ImageType; >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "output11.mha" ); >>> >>> writer->SetInput( feldkamp->GetOutput() ); >>> >>> writer->Update(); >>> >>> >>> >>> getchar(); >>> >>> return 0; >>> >>> } >>> >> >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 01:27:50 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 09:57:50 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > >> Hi >> >> I cheched projectionreader and i abtained that all projection are readed. >> ( by using: >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName( "reader.mha" ); >> >> writer->SetInput( reader->GetOutput() ); >> >> writer->Update(); >> ) >> >> and >> >> geometry is work for cpu mode means outputs are ok . >> >> >> I am confused for solving this problem!!!!!!!!!!!!!!!!! >> >> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >> cyril.mory at creatis.insa-lyon.fr> wrote: >> >>> Hi Safdary, >>> >>> Just to be sure: have you tried reconstructing in a larger volume >>> (something really huge), just to make sure you are not trying to >>> reconstruct some portion of space where, indeed, there is nothing ? >>> You can try that easily, just replace your spacing, dimension and origin >>> with >>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>> in your rtkfdk command line. >>> >>> Cyril >>> >>> >>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>> >>> Hi Yang >>> >>> >>> I am use rtkfdk.exe but the results are same as my code, >>> >>> means all pixels are zero!!! >>> >>> >>> regards >>> >>> >>> >>> safdari >>> >>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: >>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> Again, please cc rtk-users at openrtk.org when you send your email, since >>>> other users (much better experts than me!) can give us any suggestions. >>>> >>>> >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>> *To:* 'safdary mohsen' >>>> *Cc:* rtk-users at openrtk.org >>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Safdary, >>>> >>>> >>>> >>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if it >>>> works for you. >>>> >>>> >>>> >>>> The example of the command line would be: >>>> >>>> >>>> >>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>> -127.875,29.5,-127.875 --hardware cuda >>>> >>>> >>>> >>>> If it works for your image, then you can mimic the original rtkfdk code >>>> to make your own one. >>>> >>>> >>>> >>>> Good luck! >>>> >>>> >>>> >>>> Yang >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>> ] >>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>> *To:* Yang K Park >>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>> when rtk use cuda >>>> >>>> >>>> >>>> Hi Yang >>>> >>>> >>>> >>>> I have tried to adjust the window/level to see something inside of the >>>> image but all pixels set to zero. >>>> >>>> *My code is:* >>>> >>>> #define USE_CUDA >>>> >>>> int main(int , char **) >>>> >>>> { >>>> >>>> //// variable >>>> >>>> const unsigned int Dimension = 3; >>>> >>>> typedef float OutputPixelType; >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #else >>>> >>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> >>>> #endif >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Generate file names of projections >>>> >>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>> RegularExpressionSeriesFileNames::New(); >>>> >>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>> >>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>> >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> //// geometry >>>> >>>> // Defines the RTK geometry object >>>> >>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>> >>>> GeometryType::Pointer geometry = GeometryType::New(); >>>> >>>> // Projection matrices >>>> >>>> unsigned int numberOfProjections = 86; >>>> >>>> unsigned int firstAngle = 0; >>>> >>>> unsigned int angularArc = 360; >>>> >>>> unsigned int sid = 1000; >>>> >>>> unsigned int sdd = 1200; >>>> >>>> int isox = 0; >>>> >>>> int isoy = 0 ; >>>> >>>> for(unsigned int noProj=0; noProj>>> >>>> { >>>> >>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>> )numberOfProjections; >>>> >>>> geometry->AddProjection(sid, >>>> >>>> sdd, >>>> >>>> angle, >>>> >>>> isox, >>>> >>>> isoy); >>>> >>>> } >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> // Projections reader >>>> >>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> >>>> reader->SetFileNames(names->GetFileNames()); >>>> >>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> // Create reconstructed image //////////////////////////////////// >>>> >>>> typedef rtk::ConstantImageSource< OutputImageType > >>>> ConstantImageSourceType; >>>> >>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>> ::New(); >>>> >>>> ConstantImageSourceType::PointType origin; >>>> >>>> ConstantImageSourceType::SizeType sizeOutput; >>>> >>>> ConstantImageSourceType::SpacingType spacing; >>>> >>>> origin[0] = -127.75; >>>> >>>> origin[1] = -127.75; >>>> >>>> origin[2] = -127.75; >>>> >>>> >>>> >>>> sizeOutput[0] = 512; >>>> >>>> sizeOutput[1] = 512; >>>> >>>> sizeOutput[2] = 512; >>>> >>>> spacing[0] = .5; >>>> >>>> spacing[1] = .5; >>>> >>>> spacing[2] = .5; >>>> >>>> ImageSource->SetOrigin( origin ); >>>> >>>> ImageSource->SetSpacing( spacing ); >>>> >>>> ImageSource->SetSize( sizeOutput ); >>>> >>>> ImageSource->SetConstant( 0. ); >>>> >>>> // getchar(); ////////////////////////////////////// >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> >>>> std::cout << "Performing reconstruction" << std::endl; >>>> >>>> // FDK reconstruction filtering >>>> >>>> // FDK reconstruction filtering >>>> >>>> #ifdef USE_CUDA >>>> >>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #elif USE_OPENCL >>>> >>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>> >>>> #else >>>> >>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>> FDKType; >>>> >>>> #endif >>>> >>>> FDKType::Pointer feldkamp = FDKType::New(); >>>> >>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>> >>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>> >>>> feldkamp->SetGeometry( geometry); >>>> >>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>> >>>> std::cout << "Writing output image" << std::endl; >>>> >>>> // Writer >>>> >>>> typedef itk::Image< float, 3 > ImageType; >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "output11.mha" ); >>>> >>>> writer->SetInput( feldkamp->GetOutput() ); >>>> >>>> writer->Update(); >>>> >>>> >>>> >>>> getchar(); >>>> >>>> return 0; >>>> >>>> } >>>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "rtkConfiguration.h" #include #include #include #include #include #include #include #include "rtkProjectionsReader.h" #include "rtkMacro.h" #include "rtkVarianObiGeometryReader.h" #include "rtkThreeDCircularProjectionGeometryXMLFile.h" #include #include "rtkImagXImageIOFactory.h" //GPU CUDA #include // ITK includes #include #include #include #define USE_CUDA //using namespace std; int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; // source to isocenter distance in mm //pgm 452//560 //fibr 1000 1100 unsigned int sdd = 1200; // source to detector distance in mm int isox = 0; // X coordinate on the projection image of isocenter// for tiff bam -48.9505 //dcm head -80 //bmp fibr -1 -20//pgm plastich -47 -20 //mohtasham tif -97.5 -80 int isoy = 0 ;// Y coordinate on the projection image of isocenter// for tiff bam -47.952 // dcm head 30 for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; // Adjust size according to geometry sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); //feldkamp->GetRampFilter()->SetTruncationCorrection(1.); //feldkamp->GetRampFilter()->SetHannCutFrequency(0.5); // getchar(); //feldkamp->Update(); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" );//mha //writer->SetUseCompression(true); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } From simon.rit at creatis.insa-lyon.fr Thu Jun 25 02:57:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 08:57:00 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen wrote: > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > >> Hi Safdary, >> >> So you might have tried the genuine rtkfdk.exe for your recon. Would you >> give me your command line you used? >> >> Yang >> On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: >> >>> Hi >>> >>> I cheched projectionreader and i abtained that all projection are readed. >>> ( by using: >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> writer->SetFileName( "reader.mha" ); >>> >>> writer->SetInput( reader->GetOutput() ); >>> >>> writer->Update(); >>> ) >>> >>> and >>> >>> geometry is work for cpu mode means outputs are ok . >>> >>> >>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>> >>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>> cyril.mory at creatis.insa-lyon.fr> wrote: >>> >>>> Hi Safdary, >>>> >>>> Just to be sure: have you tried reconstructing in a larger volume >>>> (something really huge), just to make sure you are not trying to >>>> reconstruct some portion of space where, indeed, there is nothing ? >>>> You can try that easily, just replace your spacing, dimension and >>>> origin with >>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>> in your rtkfdk command line. >>>> >>>> Cyril >>>> >>>> >>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>> >>>> Hi Yang >>>> >>>> >>>> I am use rtkfdk.exe but the results are same as my code, >>>> >>>> means all pixels are zero!!! >>>> >>>> >>>> regards >>>> >>>> >>>> >>>> safdari >>>> >>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>> since other users (much better experts than me!) can give us any >>>>> suggestions. >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>> *To:* 'safdary mohsen' >>>>> *Cc:* rtk-users at openrtk.org >>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Safdary, >>>>> >>>>> >>>>> >>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>> it works for you. >>>>> >>>>> >>>>> >>>>> The example of the command line would be: >>>>> >>>>> >>>>> >>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>> -127.875,29.5,-127.875 --hardware cuda >>>>> >>>>> >>>>> >>>>> If it works for your image, then you can mimic the original rtkfdk >>>>> code to make your own one. >>>>> >>>>> >>>>> >>>>> Good luck! >>>>> >>>>> >>>>> >>>>> Yang >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>> ] >>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>> *To:* Yang K Park >>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>> when rtk use cuda >>>>> >>>>> >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> >>>>> I have tried to adjust the window/level to see something inside of the >>>>> image but all pixels set to zero. >>>>> >>>>> *My code is:* >>>>> >>>>> #define USE_CUDA >>>>> >>>>> int main(int , char **) >>>>> >>>>> { >>>>> >>>>> //// variable >>>>> >>>>> const unsigned int Dimension = 3; >>>>> >>>>> typedef float OutputPixelType; >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #else >>>>> >>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> >>>>> #endif >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Generate file names of projections >>>>> >>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>> RegularExpressionSeriesFileNames::New(); >>>>> >>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>> >>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>> >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //// geometry >>>>> >>>>> // Defines the RTK geometry object >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> >>>>> // Projection matrices >>>>> >>>>> unsigned int numberOfProjections = 86; >>>>> >>>>> unsigned int firstAngle = 0; >>>>> >>>>> unsigned int angularArc = 360; >>>>> >>>>> unsigned int sid = 1000; >>>>> >>>>> unsigned int sdd = 1200; >>>>> >>>>> int isox = 0; >>>>> >>>>> int isoy = 0 ; >>>>> >>>>> for(unsigned int noProj=0; noProj>>>> >>>>> { >>>>> >>>>> double angle = (float)firstAngle + (float)noProj * angularArc / (float >>>>> )numberOfProjections; >>>>> >>>>> geometry->AddProjection(sid, >>>>> >>>>> sdd, >>>>> >>>>> angle, >>>>> >>>>> isox, >>>>> >>>>> isoy); >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> // Projections reader >>>>> >>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> >>>>> reader->SetFileNames(names->GetFileNames()); >>>>> >>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> // Create reconstructed image //////////////////////////////////// >>>>> >>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>> ConstantImageSourceType; >>>>> >>>>> ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType >>>>> ::New(); >>>>> >>>>> ConstantImageSourceType::PointType origin; >>>>> >>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>> >>>>> ConstantImageSourceType::SpacingType spacing; >>>>> >>>>> origin[0] = -127.75; >>>>> >>>>> origin[1] = -127.75; >>>>> >>>>> origin[2] = -127.75; >>>>> >>>>> >>>>> >>>>> sizeOutput[0] = 512; >>>>> >>>>> sizeOutput[1] = 512; >>>>> >>>>> sizeOutput[2] = 512; >>>>> >>>>> spacing[0] = .5; >>>>> >>>>> spacing[1] = .5; >>>>> >>>>> spacing[2] = .5; >>>>> >>>>> ImageSource->SetOrigin( origin ); >>>>> >>>>> ImageSource->SetSpacing( spacing ); >>>>> >>>>> ImageSource->SetSize( sizeOutput ); >>>>> >>>>> ImageSource->SetConstant( 0. ); >>>>> >>>>> // getchar(); ////////////////////////////////////// >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> >>>>> std::cout << "Performing reconstruction" << std::endl; >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> // FDK reconstruction filtering >>>>> >>>>> #ifdef USE_CUDA >>>>> >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #elif USE_OPENCL >>>>> >>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>> >>>>> #else >>>>> >>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>> FDKType; >>>>> >>>>> #endif >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> >>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>> >>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>> >>>>> feldkamp->SetGeometry( geometry); >>>>> >>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>> >>>>> std::cout << "Writing output image" << std::endl; >>>>> >>>>> // Writer >>>>> >>>>> typedef itk::Image< float, 3 > ImageType; >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "output11.mha" ); >>>>> >>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> >>>>> >>>>> >>>>> getchar(); >>>>> >>>>> return 0; >>>>> >>>>> } >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>>> >>> > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Thu Jun 25 03:15:00 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 11:45:00 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Hi my screenshot is: [image: Inline image 1] On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit wrote: > Hi, > So you checked that projections are read but did you check what's read > with a viewer, e.g. vv ? Can you also > tell us what's the offset and the spacing in the reader.mha file? > Simon > > On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: > >> Hi >> >> what is genuine rtkfdk.exe ? >> >> source code is attached to mail and command line is: >> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >> --origin -127.875,30,-127.875 --hardware cuda >> >> >> >> >> >> >> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >> wrote: >> >>> Hi Safdary, >>> >>> So you might have tried the genuine rtkfdk.exe for your recon. Would you >>> give me your command line you used? >>> >>> Yang >>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>> wrote: >>> >>>> Hi >>>> >>>> I cheched projectionreader and i abtained that all projection are >>>> readed. >>>> ( by using: >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> writer->SetFileName( "reader.mha" ); >>>> >>>> writer->SetInput( reader->GetOutput() ); >>>> >>>> writer->Update(); >>>> ) >>>> >>>> and >>>> >>>> geometry is work for cpu mode means outputs are ok . >>>> >>>> >>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>> >>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>> (something really huge), just to make sure you are not trying to >>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>> You can try that easily, just replace your spacing, dimension and >>>>> origin with >>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>> in your rtkfdk command line. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>> >>>>> Hi Yang >>>>> >>>>> >>>>> I am use rtkfdk.exe but the results are same as my code, >>>>> >>>>> means all pixels are zero!!! >>>>> >>>>> >>>>> regards >>>>> >>>>> >>>>> >>>>> safdari >>>>> >>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>> since other users (much better experts than me!) can give us any >>>>>> suggestions. >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>> *To:* 'safdary mohsen' >>>>>> *Cc:* rtk-users at openrtk.org >>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> >>>>>> >>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>> it works for you. >>>>>> >>>>>> >>>>>> >>>>>> The example of the command line would be: >>>>>> >>>>>> >>>>>> >>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>> >>>>>> >>>>>> >>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>> code to make your own one. >>>>>> >>>>>> >>>>>> >>>>>> Good luck! >>>>>> >>>>>> >>>>>> >>>>>> Yang >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>> ] >>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>> *To:* Yang K Park >>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>> when rtk use cuda >>>>>> >>>>>> >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> >>>>>> I have tried to adjust the window/level to see something inside of >>>>>> the image but all pixels set to zero. >>>>>> >>>>>> *My code is:* >>>>>> >>>>>> #define USE_CUDA >>>>>> >>>>>> int main(int , char **) >>>>>> >>>>>> { >>>>>> >>>>>> //// variable >>>>>> >>>>>> const unsigned int Dimension = 3; >>>>>> >>>>>> typedef float OutputPixelType; >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>> >>>>>> #endif >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Generate file names of projections >>>>>> >>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>> RegularExpressionSeriesFileNames::New(); >>>>>> >>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); >>>>>> >>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>> >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //// geometry >>>>>> >>>>>> // Defines the RTK geometry object >>>>>> >>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>> >>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>> >>>>>> // Projection matrices >>>>>> >>>>>> unsigned int numberOfProjections = 86; >>>>>> >>>>>> unsigned int firstAngle = 0; >>>>>> >>>>>> unsigned int angularArc = 360; >>>>>> >>>>>> unsigned int sid = 1000; >>>>>> >>>>>> unsigned int sdd = 1200; >>>>>> >>>>>> int isox = 0; >>>>>> >>>>>> int isoy = 0 ; >>>>>> >>>>>> for(unsigned int noProj=0; noProj>>>>> >>>>>> { >>>>>> >>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>> float)numberOfProjections; >>>>>> >>>>>> geometry->AddProjection(sid, >>>>>> >>>>>> sdd, >>>>>> >>>>>> angle, >>>>>> >>>>>> isox, >>>>>> >>>>>> isoy); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> // Projections reader >>>>>> >>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> >>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>> >>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> // Create reconstructed image //////////////////////////////////// >>>>>> >>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>> ConstantImageSourceType; >>>>>> >>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>> ConstantImageSourceType::New(); >>>>>> >>>>>> ConstantImageSourceType::PointType origin; >>>>>> >>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>> >>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>> >>>>>> origin[0] = -127.75; >>>>>> >>>>>> origin[1] = -127.75; >>>>>> >>>>>> origin[2] = -127.75; >>>>>> >>>>>> >>>>>> >>>>>> sizeOutput[0] = 512; >>>>>> >>>>>> sizeOutput[1] = 512; >>>>>> >>>>>> sizeOutput[2] = 512; >>>>>> >>>>>> spacing[0] = .5; >>>>>> >>>>>> spacing[1] = .5; >>>>>> >>>>>> spacing[2] = .5; >>>>>> >>>>>> ImageSource->SetOrigin( origin ); >>>>>> >>>>>> ImageSource->SetSpacing( spacing ); >>>>>> >>>>>> ImageSource->SetSize( sizeOutput ); >>>>>> >>>>>> ImageSource->SetConstant( 0. ); >>>>>> >>>>>> // getchar(); ////////////////////////////////////// >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> >>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> // FDK reconstruction filtering >>>>>> >>>>>> #ifdef USE_CUDA >>>>>> >>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #elif USE_OPENCL >>>>>> >>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>> >>>>>> #else >>>>>> >>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>> FDKType; >>>>>> >>>>>> #endif >>>>>> >>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>> >>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>> >>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>> >>>>>> feldkamp->SetGeometry( geometry); >>>>>> >>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>> >>>>>> std::cout << "Writing output image" << std::endl; >>>>>> >>>>>> // Writer >>>>>> >>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "output11.mha" ); >>>>>> >>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> >>>>>> >>>>>> >>>>>> getchar(); >>>>>> >>>>>> return 0; >>>>>> >>>>>> } >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>> >>>>> >>>>> >>>> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Jun 25 03:20:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 25 Jun 2015 09:20:06 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen wrote: > Hi > my screenshot is: > [image: Inline image 1] > > On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < > simon.rit at creatis.insa-lyon.fr> wrote: > >> Hi, >> So you checked that projections are read but did you check what's read >> with a viewer, e.g. vv ? Can you also >> tell us what's the offset and the spacing in the reader.mha file? >> Simon >> >> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >> wrote: >> >>> Hi >>> >>> what is genuine rtkfdk.exe ? >>> >>> source code is attached to mail and command line is: >>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>> --origin -127.875,30,-127.875 --hardware cuda >>> >>> >>> >>> >>> >>> >>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>> wrote: >>> >>>> Hi Safdary, >>>> >>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>> you give me your command line you used? >>>> >>>> Yang >>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> I cheched projectionreader and i abtained that all projection are >>>>> readed. >>>>> ( by using: >>>>> >>>>> typedef itk::ImageFileWriter WriterType; >>>>> >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> >>>>> writer->SetFileName( "reader.mha" ); >>>>> >>>>> writer->SetInput( reader->GetOutput() ); >>>>> >>>>> writer->Update(); >>>>> ) >>>>> >>>>> and >>>>> >>>>> geometry is work for cpu mode means outputs are ok . >>>>> >>>>> >>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>> >>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>> >>>>>> Hi Safdary, >>>>>> >>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>> (something really huge), just to make sure you are not trying to >>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>> You can try that easily, just replace your spacing, dimension and >>>>>> origin with >>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>> in your rtkfdk command line. >>>>>> >>>>>> Cyril >>>>>> >>>>>> >>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>> >>>>>> Hi Yang >>>>>> >>>>>> >>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>> >>>>>> means all pixels are zero!!! >>>>>> >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> safdari >>>>>> >>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>> since other users (much better experts than me!) can give us any >>>>>>> suggestions. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>> *To:* 'safdary mohsen' >>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> >>>>>>> >>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see if >>>>>>> it works for you. >>>>>>> >>>>>>> >>>>>>> >>>>>>> The example of the command line would be: >>>>>>> >>>>>>> >>>>>>> >>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output >>>>>>> test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin >>>>>>> -127.875,29.5,-127.875 --hardware cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>> code to make your own one. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Good luck! >>>>>>> >>>>>>> >>>>>>> >>>>>>> Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>> ] >>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>> *To:* Yang K Park >>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 >>>>>>> when rtk use cuda >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>> the image but all pixels set to zero. >>>>>>> >>>>>>> *My code is:* >>>>>>> >>>>>>> #define USE_CUDA >>>>>>> >>>>>>> int main(int , char **) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> //// variable >>>>>>> >>>>>>> const unsigned int Dimension = 3; >>>>>>> >>>>>>> typedef float OutputPixelType; >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType >>>>>>> ; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Generate file names of projections >>>>>>> >>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>> >>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>> )); >>>>>>> >>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>> >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> //// geometry >>>>>>> >>>>>>> // Defines the RTK geometry object >>>>>>> >>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>> >>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>> >>>>>>> // Projection matrices >>>>>>> >>>>>>> unsigned int numberOfProjections = 86; >>>>>>> >>>>>>> unsigned int firstAngle = 0; >>>>>>> >>>>>>> unsigned int angularArc = 360; >>>>>>> >>>>>>> unsigned int sid = 1000; >>>>>>> >>>>>>> unsigned int sdd = 1200; >>>>>>> >>>>>>> int isox = 0; >>>>>>> >>>>>>> int isoy = 0 ; >>>>>>> >>>>>>> for(unsigned int noProj=0; noProj>>>>>> >>>>>>> { >>>>>>> >>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>> float)numberOfProjections; >>>>>>> >>>>>>> geometry->AddProjection(sid, >>>>>>> >>>>>>> sdd, >>>>>>> >>>>>>> angle, >>>>>>> >>>>>>> isox, >>>>>>> >>>>>>> isoy); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> // Projections reader >>>>>>> >>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> >>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>> >>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>> >>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>> ConstantImageSourceType; >>>>>>> >>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>> ConstantImageSourceType::New(); >>>>>>> >>>>>>> ConstantImageSourceType::PointType origin; >>>>>>> >>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>> >>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>> >>>>>>> origin[0] = -127.75; >>>>>>> >>>>>>> origin[1] = -127.75; >>>>>>> >>>>>>> origin[2] = -127.75; >>>>>>> >>>>>>> >>>>>>> >>>>>>> sizeOutput[0] = 512; >>>>>>> >>>>>>> sizeOutput[1] = 512; >>>>>>> >>>>>>> sizeOutput[2] = 512; >>>>>>> >>>>>>> spacing[0] = .5; >>>>>>> >>>>>>> spacing[1] = .5; >>>>>>> >>>>>>> spacing[2] = .5; >>>>>>> >>>>>>> ImageSource->SetOrigin( origin ); >>>>>>> >>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>> >>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>> >>>>>>> ImageSource->SetConstant( 0. ); >>>>>>> >>>>>>> // getchar(); ////////////////////////////////////// >>>>>>> >>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>> >>>>>>> >>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> // FDK reconstruction filtering >>>>>>> >>>>>>> #ifdef USE_CUDA >>>>>>> >>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #elif USE_OPENCL >>>>>>> >>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>> >>>>>>> #else >>>>>>> >>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>> FDKType; >>>>>>> >>>>>>> #endif >>>>>>> >>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>> >>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>> >>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>> >>>>>>> feldkamp->SetGeometry( geometry); >>>>>>> >>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>> >>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>> >>>>>>> // Writer >>>>>>> >>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>> >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> >>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>> >>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>> >>>>>>> writer->Update(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> getchar(); >>>>>>> >>>>>>> return 0; >>>>>>> >>>>>>> } >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>>> >>>>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From ieee.safdary at gmail.com Thu Jun 25 03:33:23 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Thu, 25 Jun 2015 12:03:23 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) [image: Inline image 1] On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit wrote: > So your projections are empty (default window/level is computed from the > min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise > that your reconstruction too. I don't know exactly where do your hnd files > come from but this is currently detected and treated as a Varian file > format in RTK, see the graph here > . > Simon > > On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: > >> Hi >> my screenshot is: >> [image: Inline image 1] >> >> On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit < >> simon.rit at creatis.insa-lyon.fr> wrote: >> >>> Hi, >>> So you checked that projections are read but did you check what's read >>> with a viewer, e.g. vv ? Can you also >>> tell us what's the offset and the spacing in the reader.mha file? >>> Simon >>> >>> On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen >>> wrote: >>> >>>> Hi >>>> >>>> what is genuine rtkfdk.exe ? >>>> >>>> source code is attached to mail and command line is: >>>> rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output >>>> slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 >>>> --origin -127.875,30,-127.875 --hardware cuda >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park >>>> wrote: >>>> >>>>> Hi Safdary, >>>>> >>>>> So you might have tried the genuine rtkfdk.exe for your recon. Would >>>>> you give me your command line you used? >>>>> >>>>> Yang >>>>> On Jun 24, 2015 3:48 AM, "safdary mohsen" >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I cheched projectionreader and i abtained that all projection are >>>>>> readed. >>>>>> ( by using: >>>>>> >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> >>>>>> writer->SetFileName( "reader.mha" ); >>>>>> >>>>>> writer->SetInput( reader->GetOutput() ); >>>>>> >>>>>> writer->Update(); >>>>>> ) >>>>>> >>>>>> and >>>>>> >>>>>> geometry is work for cpu mode means outputs are ok . >>>>>> >>>>>> >>>>>> I am confused for solving this problem!!!!!!!!!!!!!!!!! >>>>>> >>>>>> On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < >>>>>> cyril.mory at creatis.insa-lyon.fr> wrote: >>>>>> >>>>>>> Hi Safdary, >>>>>>> >>>>>>> Just to be sure: have you tried reconstructing in a larger volume >>>>>>> (something really huge), just to make sure you are not trying to >>>>>>> reconstruct some portion of space where, indeed, there is nothing ? >>>>>>> You can try that easily, just replace your spacing, dimension and >>>>>>> origin with >>>>>>> --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 >>>>>>> in your rtkfdk command line. >>>>>>> >>>>>>> Cyril >>>>>>> >>>>>>> >>>>>>> On 06/15/2015 05:19 PM, safdary mohsen wrote: >>>>>>> >>>>>>> Hi Yang >>>>>>> >>>>>>> >>>>>>> I am use rtkfdk.exe but the results are same as my code, >>>>>>> >>>>>>> means all pixels are zero!!! >>>>>>> >>>>>>> >>>>>>> regards >>>>>>> >>>>>>> >>>>>>> >>>>>>> safdari >>>>>>> >>>>>>> On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Again, please cc rtk-users at openrtk.org when you send your email, >>>>>>>> since other users (much better experts than me!) can give us any >>>>>>>> suggestions. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* Yang K Park [mailto:theday79 at gmail.com] >>>>>>>> *Sent:* Monday, June 15, 2015 10:37 AM >>>>>>>> *To:* 'safdary mohsen' >>>>>>>> *Cc:* rtk-users at openrtk.org >>>>>>>> *Subject:* RE: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Safdary, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I recommend you to try rtkfdk.exe first (with cuda option) to see >>>>>>>> if it works for you. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The example of the command line would be: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his >>>>>>>> --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 >>>>>>>> --origin -127.875,29.5,-127.875 --hardware cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> If it works for your image, then you can mimic the original rtkfdk >>>>>>>> code to make your own one. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Good luck! >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *From:* safdary mohsen [mailto:ieee.safdary at gmail.com >>>>>>>> ] >>>>>>>> *Sent:* Saturday, June 13, 2015 11:58 PM >>>>>>>> *To:* Yang K Park >>>>>>>> *Subject:* Re: [Rtk-users] error on build rtk in visual studio >>>>>>>> 2012 when rtk use cuda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Hi Yang >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I have tried to adjust the window/level to see something inside of >>>>>>>> the image but all pixels set to zero. >>>>>>>> >>>>>>>> *My code is:* >>>>>>>> >>>>>>>> #define USE_CUDA >>>>>>>> >>>>>>>> int main(int , char **) >>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> //// variable >>>>>>>> >>>>>>>> const unsigned int Dimension = 3; >>>>>>>> >>>>>>>> typedef float OutputPixelType; >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef itk::CudaImage< OutputPixelType, Dimension > >>>>>>>> OutputImageType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Generate file names of projections >>>>>>>> >>>>>>>> itk::RegularExpressionSeriesFileNames::Pointer names = itk:: >>>>>>>> RegularExpressionSeriesFileNames::New(); >>>>>>>> >>>>>>>> names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/" >>>>>>>> )); >>>>>>>> >>>>>>>> names->SetRegularExpression(std::string("Proj_.*.hnd")); >>>>>>>> >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> //// geometry >>>>>>>> >>>>>>>> // Defines the RTK geometry object >>>>>>>> >>>>>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>>>>> >>>>>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>>>>> >>>>>>>> // Projection matrices >>>>>>>> >>>>>>>> unsigned int numberOfProjections = 86; >>>>>>>> >>>>>>>> unsigned int firstAngle = 0; >>>>>>>> >>>>>>>> unsigned int angularArc = 360; >>>>>>>> >>>>>>>> unsigned int sid = 1000; >>>>>>>> >>>>>>>> unsigned int sdd = 1200; >>>>>>>> >>>>>>>> int isox = 0; >>>>>>>> >>>>>>>> int isoy = 0 ; >>>>>>>> >>>>>>>> for(unsigned int noProj=0; noProj>>>>>>> >>>>>>>> { >>>>>>>> >>>>>>>> double angle = (float)firstAngle + (float)noProj * angularArc / ( >>>>>>>> float)numberOfProjections; >>>>>>>> >>>>>>>> geometry->AddProjection(sid, >>>>>>>> >>>>>>>> sdd, >>>>>>>> >>>>>>>> angle, >>>>>>>> >>>>>>>> isox, >>>>>>>> >>>>>>>> isoy); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> // Projections reader >>>>>>>> >>>>>>>> typedef rtk::ProjectionsReader< OutputImageType > ReaderType; >>>>>>>> >>>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>>> >>>>>>>> reader->SetFileNames(names->GetFileNames()); >>>>>>>> >>>>>>>> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> // Create reconstructed image //////////////////////////////////// >>>>>>>> >>>>>>>> typedef rtk::ConstantImageSource< OutputImageType > >>>>>>>> ConstantImageSourceType; >>>>>>>> >>>>>>>> ConstantImageSourceType::Pointer ImageSource = >>>>>>>> ConstantImageSourceType::New(); >>>>>>>> >>>>>>>> ConstantImageSourceType::PointType origin; >>>>>>>> >>>>>>>> ConstantImageSourceType::SizeType sizeOutput; >>>>>>>> >>>>>>>> ConstantImageSourceType::SpacingType spacing; >>>>>>>> >>>>>>>> origin[0] = -127.75; >>>>>>>> >>>>>>>> origin[1] = -127.75; >>>>>>>> >>>>>>>> origin[2] = -127.75; >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> sizeOutput[0] = 512; >>>>>>>> >>>>>>>> sizeOutput[1] = 512; >>>>>>>> >>>>>>>> sizeOutput[2] = 512; >>>>>>>> >>>>>>>> spacing[0] = .5; >>>>>>>> >>>>>>>> spacing[1] = .5; >>>>>>>> >>>>>>>> spacing[2] = .5; >>>>>>>> >>>>>>>> ImageSource->SetOrigin( origin ); >>>>>>>> >>>>>>>> ImageSource->SetSpacing( spacing ); >>>>>>>> >>>>>>>> ImageSource->SetSize( sizeOutput ); >>>>>>>> >>>>>>>> ImageSource->SetConstant( 0. ); >>>>>>>> >>>>>>>> // getchar(); ////////////////////////////////////// >>>>>>>> >>>>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>>>> >>>>>>>> >>>>>>>> std::cout << "Performing reconstruction" << std::endl; >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> // FDK reconstruction filtering >>>>>>>> >>>>>>>> #ifdef USE_CUDA >>>>>>>> >>>>>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #elif USE_OPENCL >>>>>>>> >>>>>>>> typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; >>>>>>>> >>>>>>>> #else >>>>>>>> >>>>>>>> typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > >>>>>>>> FDKType; >>>>>>>> >>>>>>>> #endif >>>>>>>> >>>>>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>>>>> >>>>>>>> feldkamp->SetInput( 0, ImageSource->GetOutput() ); >>>>>>>> >>>>>>>> feldkamp->SetInput( 1, reader->GetOutput()); >>>>>>>> >>>>>>>> feldkamp->SetGeometry( geometry); >>>>>>>> >>>>>>>> TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); >>>>>>>> >>>>>>>> std::cout << "Writing output image" << std::endl; >>>>>>>> >>>>>>>> // Writer >>>>>>>> >>>>>>>> typedef itk::Image< float, 3 > ImageType; >>>>>>>> >>>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>>> >>>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>>> >>>>>>>> writer->SetFileName( "output11.mha" ); >>>>>>>> >>>>>>>> writer->SetInput( feldkamp->GetOutput() ); >>>>>>>> >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> getchar(); >>>>>>>> >>>>>>>> return 0; >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Rtk-users mailing list >>>> Rtk-users at public.kitware.com >>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:37:10 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:37:10 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <004601d0af5c$cd943a80$68bcaf80$@gmail.com> Hi Safdary, I?m not an expert on this issue, but I guess there is something wrong with your CUDA system, since you said there is no problem with CPU based FDK. (To make it clear, if you use following command line, the reconstruction was successfully done?) rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) I think your graphic card might be fully compatible with CUDA v6.5, but why don?t you try to install some lower version of CUDA? (e.g. v4.5, with compatible graphic card as well.) But I would rather wait for other guys? suggestions first, because I?m not quite sure this could have any effects.) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 3:33 AM To: Simon Rit Cc: Yang-Kyun Park; Cyril Mory; rtk-users at openrtk.org Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Yes all pixels are set to zero and hnd files come frome RTK page: http://wiki.openrtk.org/index.php/RTK/Examples/VarianReconstruction but i used 86 projections insted of 686 projections and I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) On Thu, Jun 25, 2015 at 11:50 AM, Simon Rit > wrote: So your projections are empty (default window/level is computed from the min/max so if it's set to 0/0, all pixels equal 0) and it's not a surprise that your reconstruction too. I don't know exactly where do your hnd files come from but this is currently detected and treated as a Varian file format in RTK, see the graph here . Simon On Thu, Jun 25, 2015 at 9:15 AM, safdary mohsen > wrote: Hi my screenshot is: On Thu, Jun 25, 2015 at 11:27 AM, Simon Rit > wrote: Hi, So you checked that projections are read but did you check what's read with a viewer, e.g. vv ? Can you also tell us what's the offset and the spacing in the reader.mha file? Simon On Thu, Jun 25, 2015 at 7:27 AM, safdary mohsen > wrote: Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 182913 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 112590 bytes Desc: not available URL: From theday79 at gmail.com Thu Jun 25 11:55:17 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 25 Jun 2015 11:55:17 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> Message-ID: <005e01d0af5f$5560b720$00222560$@gmail.com> Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com ] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ieee.safdary at gmail.com Fri Jun 26 01:52:39 2015 From: ieee.safdary at gmail.com (safdary mohsen) Date: Fri, 26 Jun 2015 10:22:39 +0430 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry.xml Type: text/xml Size: 31476 bytes Desc: not available URL: From cyril.mory at uclouvain.be Fri Jun 26 05:46:43 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 26 Jun 2015 11:46:43 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: <005e01d0af5f$5560b720$00222560$@gmail.com> References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <558D1F83.40003@uclouvain.be> Hi Safdary, I have tested your geometry with the Varian data and the command line you provided, for both CPU and CUDA reconstructions, and it works on my system, with the version of RTK present on the master branch of the git repository and the rtkfdk tool it provides. Could you perform the test suggested by Yang, and let us know whether you managed to reconstruct your slice, both with and without the --hardware=cuda option ? The help we can provide will greatly depend on the outcome of this test: * if it works, then you RTK is fine, your system is fine, and the modifications you had performed on the rtkfdk application code caused some error. You can start over from the rtkfdk provided by the git repository and modify it as you like, and track which modification causes your problem. * if it does not work, then it is either a bug in RTK or a problem with your system, and we should strive to correct the bug or understand why your system cannot run rtkfdk properly Best regards, Cyril On 06/25/2015 05:55 PM, Yang K Park wrote: > > Hi Safdary, > > I?m a bit confused because the attached source code is not original > rtkfdk source code. > > So, my point about genuine rtkfdk means, > > 1.Update your rtk source > > 2.Don?t change any source code and just compile them. > > 3.Use the example dataset for Varian from RTK website. > > 4.In the command prompt, run the command line (?rtkfdk ??) > > I guess you already did the above things, and then you could see > something with CPU option but nothing in your cuda-based reconstruction. > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced > during RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > Yang > > *From:*safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 > when rtk use cuda > > Hi > > what is genuine rtkfdk.exe ? > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension > 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Sat Jun 27 01:40:42 2015 From: theday79 at gmail.com (Yang K Park) Date: Sat, 27 Jun 2015 01:40:42 -0400 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: <001001d0a20e$fc88a5c0$f599f140$@gmail.com> <003701d0a37c$7c3c8e80$74b5ab80$@gmail.com> <001d01d0a642$b9e884a0$2db98de0$@gmail.com> <001d01d0a778$be609860$3b21c920$@gmail.com> <002e01d0a779$3f61cd80$be256880$@gmail.com> <557FC4B2.5060504@creatis.insa-lyon.fr> <005e01d0af5f$5560b720$00222560$@gmail.com> Message-ID: <001401d0b09b$cf67a500$6e36ef00$@gmail.com> Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park > wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto: ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" > wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory > wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park > wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto: theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [ mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From robert.calliess at gmx.de Sun Jun 28 05:23:07 2015 From: robert.calliess at gmx.de (=?ISO-8859-1?Q?Robert_Callie=DF?=) Date: Sun, 28 Jun 2015 11:23:07 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Message-ID: Hello, just a short question. Is there a tutorial for using RTK in visual studio respectively for creating the solution files? kind regards, Robert C. -------- Urspr?ngliche Nachricht -------- Von: Yang K Park Datum:27.06.2015 07:40 (GMT+01:00) An: 'safdary mohsen' Cc: rtk-users at openrtk.org Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I?ve checked my up-to-date rtk source. The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure that you are using up-to-date rtk? If you are using old version located somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version in ?trunk? directory.) In that cmake file, I found that the problematic codes had been already commented out as below: if("${CUDA_VERSION}" LESS 6.5) # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} # -gencode arch=compute_10,code=sm_10 # -gencode arch=compute_11,code=sm_11 # -gencode arch=compute_12,code=sm_12 # -gencode arch=compute_13,code=sm_13 # ) endif () if("${CUDA_VERSION}" LESS 5.0) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 ) else() set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 ) endif() But it seems that your capture image is different from my up-to-date one. If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), and really want to stick with it, just try to replace the suspicious paragraph with following: if(CUDA_VERSION_MAJOR LESS "6") message (STATUS " >> Generation 1: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 ) else() message (STATUS " >> Generation 1: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "2") message (STATUS " >> Generation 2: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20 ) else() message (STATUS " >> Generation 2: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "4") message (STATUS " >> Generation 3: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 ) else() message (STATUS " >> Generation 3: [ ]") endif() if(CUDA_VERSION_MAJOR GREATER "5") message (STATUS " >> Generation 5: [X]") set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 ) else() message (STATUS " >> Generation 5: [ ]") endif() Again, I think you would not face CUDA issue with up-to-date version of rtk (which is in ?trunk? directory). Hope this helps. Yang __________________________________________ From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 27, 2015 12:48 AM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang So you are guess that remove --gencode arch=compute_10,code=sm_10 from cmake file(findcuda_wrap) couses this problem!!! have you any suggestion? On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen wrote: Hi Yang i am use this command and the result is ok but in cuda mode not. rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cpu) and screen shot of my cuda version is attached (v6.5) On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen wrote: Hi Cyril Mory I am using example dataset for Varian from RTK website. But i am using 86 projections insted of 686: Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd and my geometry file is atached to mail On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: Hi Safdary, I?m a bit confused because the attached source code is not original rtkfdk source code. So, my point about genuine rtkfdk means, 1. Update your rtk source 2. Don?t change any source code and just compile them. 3. Use the example dataset for Varian from RTK website. 4. In the command prompt, run the command line (?rtkfdk ??) I guess you already did the above things, and then you could see something with CPU option but nothing in your cuda-based reconstruction. If that is the case, I?m suspecting your CUDA/Graphic driver and cuda implementation such as CUDA-compute_10 error you might have faced during RTK compiling. To be honest, I have no idea how to deal with such issues.(Sorry about that) Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Thursday, June 25, 2015 1:28 AM To: Yang-Kyun Park Cc: rtk-users at openrtk.org; Cyril Mory Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi what is genuine rtkfdk.exe ? source code is attached to mail and command line is: rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 --origin -127.875,30,-127.875 --hardware cuda On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park wrote: Hi Safdary, So you might have tried the genuine rtkfdk.exe for your recon. Would you give me your command line you used? Yang On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: Hi I cheched projectionreader and i abtained that all projection are readed. ( by using: typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "reader.mha" ); writer->SetInput( reader->GetOutput() ); writer->Update(); ) and geometry is work for cpu mode means outputs are ok . I am confused for solving this problem!!!!!!!!!!!!!!!!! On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory wrote: Hi Safdary, Just to be sure: have you tried reconstructing in a larger volume (something really huge), just to make sure you are not trying to reconstruct some portion of space where, indeed, there is nothing ? You can try that easily, just replace your spacing, dimension and origin with --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 in your rtkfdk command line. Cyril On 06/15/2015 05:19 PM, safdary mohsen wrote: Hi Yang I am use rtkfdk.exe but the results are same as my code, means all pixels are zero!!! regards safdari On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: Hi Safdary, Again, please cc rtk-users at openrtk.org when you send your email, since other users (much better experts than me!) can give us any suggestions. Thanks. Yang From: Yang K Park [mailto:theday79 at gmail.com] Sent: Monday, June 15, 2015 10:37 AM To: 'safdary mohsen' Cc: rtk-users at openrtk.org Subject: RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Safdary, I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you. The example of the command line would be: rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 --hardware cuda If it works for your image, then you can mimic the original rtkfdk code to make your own one. Good luck! Yang From: safdary mohsen [mailto:ieee.safdary at gmail.com] Sent: Saturday, June 13, 2015 11:58 PM To: Yang K Park Subject: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda Hi Yang I have tried to adjust the window/level to see something inside of the image but all pixels set to zero. My code is: #define USE_CUDA int main(int , char **) { //// variable const unsigned int Dimension = 3; typedef float OutputPixelType; #ifdef USE_CUDA typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; #else typedef itk::Image< OutputPixelType, Dimension > OutputImageType; #endif //////////////////////////////////////////////////////////////////////////////////////////////////// // Generate file names of projections itk::RegularExpressionSeriesFileNames::Pointer names = itk::RegularExpressionSeriesFileNames::New(); names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); names->SetRegularExpression(std::string("Proj_.*.hnd")); //////////////////////////////////////////////////////////////////////////////////////////////////// //// geometry // Defines the RTK geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); // Projection matrices unsigned int numberOfProjections = 86; unsigned int firstAngle = 0; unsigned int angularArc = 360; unsigned int sid = 1000; unsigned int sdd = 1200; int isox = 0; int isoy = 0 ; for(unsigned int noProj=0; noProjAddProjection(sid, sdd, angle, isox, isoy); } ///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Projections reader typedef rtk::ProjectionsReader< OutputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileNames(names->GetFileNames()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create reconstructed image //////////////////////////////////// typedef rtk::ConstantImageSource< OutputImageType > ConstantImageSourceType; ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType::New(); ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType sizeOutput; ConstantImageSourceType::SpacingType spacing; origin[0] = -127.75; origin[1] = -127.75; origin[2] = -127.75; sizeOutput[0] = 512; sizeOutput[1] = 512; sizeOutput[2] = 512; spacing[0] = .5; spacing[1] = .5; spacing[2] = .5; ImageSource->SetOrigin( origin ); ImageSource->SetSpacing( spacing ); ImageSource->SetSize( sizeOutput ); ImageSource->SetConstant( 0. ); // getchar(); ////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::cout << "Performing reconstruction" << std::endl; // FDK reconstruction filtering // FDK reconstruction filtering #ifdef USE_CUDA typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #elif USE_OPENCL typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; #else typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; #endif FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput( 0, ImageSource->GetOutput() ); feldkamp->SetInput( 1, reader->GetOutput()); feldkamp->SetGeometry( geometry); TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); std::cout << "Writing output image" << std::endl; // Writer typedef itk::Image< float, 3 > ImageType; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName( "output11.mha" ); writer->SetInput( feldkamp->GetOutput() ); writer->Update(); getchar(); return 0; } _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 148571 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Sun Jun 28 06:55:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 28 Jun 2015 12:55:30 +0200 Subject: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda In-Reply-To: References: Message-ID: Hi, No, as far as I know (I'm not a Windows user), use of VS with RTK is similar to any cmake-based project. So you could try to find some info on the cmake website. Simon On Sun, Jun 28, 2015 at 11:23 AM, Robert Callie? wrote: > Hello, > just a short question. Is there a tutorial for using RTK in visual studio > respectively for creating the solution files? > > kind regards, > Robert C. > > > -------- Urspr?ngliche Nachricht -------- > Von: Yang K Park > Datum:27.06.2015 07:40 (GMT+01:00) > An: 'safdary mohsen' > Cc: rtk-users at openrtk.org > Betreff: Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk > use cuda > > Hi Safdary, > > > > I?ve checked my up-to-date rtk source. > > > > The FindCUDA_wrap.cmake file is located at ?..\trunk\cmake? (Are you sure > that you are using up-to-date rtk? If you are using old version located > somewhere in ?\tags\v1.0.0?, I?m recommending you to find another version > in ?trunk? directory.) > > > > In that cmake file, I found that the problematic codes had been already > commented out as below: > > > > if("${CUDA_VERSION}" LESS 6.5) > > # set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > # -gencode arch=compute_10,code=sm_10 > > # -gencode arch=compute_11,code=sm_11 > > # -gencode arch=compute_12,code=sm_12 > > # -gencode arch=compute_13,code=sm_13 > > # ) > > endif () > > > > if("${CUDA_VERSION}" LESS 5.0) > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_20,code=compute_20 > > ) > > else() > > set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > -gencode arch=compute_30,code=sm_30 > > -gencode arch=compute_35,code=sm_35 > > -gencode arch=compute_35,code=compute_35 > > ) > > endif() > > > > But it seems that your capture image is different from my up-to-date one. > > If you are using some previous version of rtk ( such as 1.0.0, rc1.0_rc3), > and really want to stick with it, > > just try to replace the suspicious paragraph with following: > > > > if(CUDA_VERSION_MAJOR LESS "6") > > message (STATUS " >> Generation 1: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_10,code=sm_10 > > -gencode arch=compute_11,code=sm_11 > > -gencode arch=compute_12,code=sm_12 > > -gencode arch=compute_13,code=sm_13 > > ) > > else() > > message (STATUS " >> Generation 1: [ ]") > > endif() > > if(CUDA_VERSION_MAJOR GREATER "2") > > message (STATUS " >> Generation 2: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_20,code=sm_20 > > ) > > else() > > message (STATUS " >> Generation 2: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "4") > > message (STATUS " >> Generation 3: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_30,code=sm_30 > > ) > > else() > > message (STATUS " >> Generation 3: [ ]") > > endif() > > > > if(CUDA_VERSION_MAJOR GREATER "5") > > message (STATUS " >> Generation 5: [X]") > > set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} > > -gencode arch=compute_50,code=sm_50 > > -gencode arch=compute_50,code=compute_50 > > ) > > else() > > message (STATUS " >> Generation 5: [ ]") > > endif() > > > > > > Again, I think you would not face CUDA issue with up-to-date version of > rtk (which is in ?trunk? directory). > > > > Hope this helps. > > > > Yang > > > > > > __________________________________________ > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Saturday, June 27, 2015 12:48 AM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > So you are guess that remove --gencode arch=compute_10,code=sm_10 from > cmake file(findcuda_wrap) couses this problem!!! > > have you any suggestion? > > > > [image: Inline image 2] > > > > > > On Fri, Jun 26, 2015 at 10:33 AM, safdary mohsen > wrote: > > Hi Yang > > i am use this command and the result is ok but in cuda mode not. > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cpu) > > > > and screen shot of my cuda version is attached (v6.5) > > > > > > > > On Fri, Jun 26, 2015 at 10:22 AM, safdary mohsen > wrote: > > Hi Cyril Mory > > I am using example dataset for Varian from RTK website. > > But i am using 86 projections insted of 686: > > Proj_00000.hnd , Proj_00008.hnd , Proj_00012.hnd +(steps : 8) ..., > Proj_00280.hnd, Proj_00288.hnd, ....,Proj_00672.hnd, Proj_00680.hnd > > and my geometry file is atached to mail > > > > On Thu, Jun 25, 2015 at 8:25 PM, Yang K Park wrote: > > Hi Safdary, > > > > I?m a bit confused because the attached source code is not original rtkfdk > source code. > > > > So, my point about genuine rtkfdk means, > > 1. Update your rtk source > > 2. Don?t change any source code and just compile them. > > 3. Use the example dataset for Varian from RTK website. > > 4. In the command prompt, run the command line (?rtkfdk ??) > > > > I guess you already did the above things, and then you could see something > with CPU option but nothing in your cuda-based reconstruction. > > > > If that is the case, I?m suspecting your CUDA/Graphic driver and cuda > implementation such as CUDA-compute_10 error you might have faced during > RTK compiling. > > To be honest, I have no idea how to deal with such issues.(Sorry about > that) > > > > Yang > > > > > > > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com] > *Sent:* Thursday, June 25, 2015 1:28 AM > *To:* Yang-Kyun Park > *Cc:* rtk-users at openrtk.org; Cyril Mory > > > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi > > > > what is genuine rtkfdk.exe ? > > > > source code is attached to mail and command line is: > > rtkfdk --geometry geometry.xml --regexp .*.hnd --path Scan0 --output > slice30.mha --verbose --spacing 0.25,0.25,0.25 --dimension 1024,1,1024 > --origin -127.875,30,-127.875 --hardware cuda > > > > > > > > > > > > > > On Wed, Jun 24, 2015 at 5:51 PM, Yang-Kyun Park > wrote: > > Hi Safdary, > > So you might have tried the genuine rtkfdk.exe for your recon. Would you > give me your command line you used? > > Yang > > On Jun 24, 2015 3:48 AM, "safdary mohsen" wrote: > > Hi > > > > I cheched projectionreader and i abtained that all projection are readed. > > ( by using: > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "reader.mha" ); > > writer->SetInput( reader->GetOutput() ); > > writer->Update(); > > ) > > > > and > > > > geometry is work for cpu mode means outputs are ok . > > > > > > I am confused for solving this problem!!!!!!!!!!!!!!!!! > > > > On Tue, Jun 16, 2015 at 11:09 AM, Cyril Mory < > cyril.mory at creatis.insa-lyon.fr> wrote: > > Hi Safdary, > > Just to be sure: have you tried reconstructing in a larger volume > (something really huge), just to make sure you are not trying to > reconstruct some portion of space where, indeed, there is nothing ? > You can try that easily, just replace your spacing, dimension and origin > with > --spacing 16,16,16 --dimension 256,256,256 --origin -2040,-2040,-2040 > in your rtkfdk command line. > > Cyril > > > > On 06/15/2015 05:19 PM, safdary mohsen wrote: > > Hi Yang > > > > > > I am use rtkfdk.exe but the results are same as my code, > > means all pixels are zero!!! > > > > regards > > > > safdari > > > > On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park wrote: > > Hi Safdary, > > > > Again, please cc rtk-users at openrtk.org when you send your email, since > other users (much better experts than me!) can give us any suggestions. > > > > Thanks. > > > > Yang > > > > *From:* Yang K Park [mailto:theday79 at gmail.com] > *Sent:* Monday, June 15, 2015 10:37 AM > *To:* 'safdary mohsen' > *Cc:* rtk-users at openrtk.org > *Subject:* RE: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Safdary, > > > > I recommend you to try rtkfdk.exe first (with cuda option) to see if it > works for you. > > > > The example of the command line would be: > > > > rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output > test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin > -127.875,29.5,-127.875 --hardware cuda > > > > If it works for your image, then you can mimic the original rtkfdk code to > make your own one. > > > > Good luck! > > > > Yang > > > > > > > > > > *From:* safdary mohsen [mailto:ieee.safdary at gmail.com > ] > *Sent:* Saturday, June 13, 2015 11:58 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] error on build rtk in visual studio 2012 when > rtk use cuda > > > > Hi Yang > > > > I have tried to adjust the window/level to see something inside of the > image but all pixels set to zero. > > *My code is:* > > #define USE_CUDA > > int main(int , char **) > > { > > //// variable > > const unsigned int Dimension = 3; > > typedef float OutputPixelType; > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutputPixelType, Dimension > OutputImageType; > > #else > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > #endif > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > // Generate file names of projections > > itk::RegularExpressionSeriesFileNames::Pointer names = itk:: > RegularExpressionSeriesFileNames::New(); > > names->SetDirectory(std::string("d://RTK/build/bin/Release/Scan1/")); > > names->SetRegularExpression(std::string("Proj_.*.hnd")); > > > //////////////////////////////////////////////////////////////////////////////////////////////////// > > //// geometry > > // Defines the RTK geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > // Projection matrices > > unsigned int numberOfProjections = 86; > > unsigned int firstAngle = 0; > > unsigned int angularArc = 360; > > unsigned int sid = 1000; > > unsigned int sdd = 1200; > > int isox = 0; > > int isoy = 0 ; > > for(unsigned int noProj=0; noProj > { > > double angle = (float)firstAngle + (float)noProj * angularArc / (float > )numberOfProjections; > > geometry->AddProjection(sid, > > sdd, > > angle, > > isox, > > isoy); > > } > > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // Projections reader > > typedef rtk::ProjectionsReader< OutputImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileNames(names->GetFileNames()); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > // Create reconstructed image //////////////////////////////////// > > typedef rtk::ConstantImageSource< OutputImageType > > ConstantImageSourceType; > > ConstantImageSourceType::Pointer ImageSource = ConstantImageSourceType > ::New(); > > ConstantImageSourceType::PointType origin; > > ConstantImageSourceType::SizeType sizeOutput; > > ConstantImageSourceType::SpacingType spacing; > > origin[0] = -127.75; > > origin[1] = -127.75; > > origin[2] = -127.75; > > > > sizeOutput[0] = 512; > > sizeOutput[1] = 512; > > sizeOutput[2] = 512; > > spacing[0] = .5; > > spacing[1] = .5; > > spacing[2] = .5; > > ImageSource->SetOrigin( origin ); > > ImageSource->SetSpacing( spacing ); > > ImageSource->SetSize( sizeOutput ); > > ImageSource->SetConstant( 0. ); > > // getchar(); ////////////////////////////////////// > > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > std::cout << "Performing reconstruction" << std::endl; > > // FDK reconstruction filtering > > // FDK reconstruction filtering > > #ifdef USE_CUDA > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #elif USE_OPENCL > > typedef rtk::OpenCLFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType; > > #endif > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput( 0, ImageSource->GetOutput() ); > > feldkamp->SetInput( 1, reader->GetOutput()); > > feldkamp->SetGeometry( geometry); > > TRY_AND_EXIT_ON_ITK_EXCEPTION( feldkamp->Update() ); > > std::cout << "Writing output image" << std::endl; > > // Writer > > typedef itk::Image< float, 3 > ImageType; > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName( "output11.mha" ); > > writer->SetInput( feldkamp->GetOutput() ); > > writer->Update(); > > > > getchar(); > > return 0; > > } > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > > > > > > > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Mon Jun 29 10:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 29 Jun 2015 16:15:43 +0200 Subject: [Rtk-users] RTK user meeting on image quality in static CBCT In-Reply-To: References: Message-ID: Hi, I have started to prepare a wiki page for the meeting: http://wiki.openrtk.org/index.php/RTK/Meetings/OnImageQualityInStaticCBCT#Existing_RTK_solutions This is my last email to the RTK mailing list so if your name is not on the attendees list (based on the foodle), please let me know ASAP that you intend to join. Also let me know if you've changed your mind. The room has a videoconference equipment so I'll try to offer the possibility to follow the meeting from distance; let me know and I'll send you the info on how to connect. But I strongly encourage you to come to Lyon, the priority will be given to having a fruitful local meeting and I can't promise that the quality of the video conf will be good. And don't forget that the meeting will be during the day in France, from 9 am to 6 pm approximately. Please suggest changes to the wiki, I'd like to have your inputs to put an agenda together. And let me know if you need more practical information to organize your visit. I'm looking forward to the meeting! Simon On Tue, Jun 16, 2015 at 10:14 AM, Simon Rit wrote: > Hi, > The consensus date is Friday July 31, 2015. Save the date! > The meeting will be at the L?on B?rard center in Lyon, I'll soon > provide more details on the organization. > Simon > > On Wed, Jun 10, 2015 at 10:12 AM, Simon Rit > wrote: > > Dear RTK users and developers, > > We are a few users to face the same problem of poor image quality in > > cone-beam CT due to photon statistics, detector effects (lag, glare, > ...), > > beam hardening and/or scatter. RTK has basic solutions, there are other > > solutions being implemented and we would like better solutions > implemented. > > I would like to invite those that want to contribute to this topic to a > > one-day meeting in Lyon the last week of July. > > > > Goals: > > - present and discuss existing RTK solutions, > > - present and discuss solutions being implemented in RTK, > > - propose the development of new solutions and share the work. > > > > Place: Lyon, France (exact location to be announced) > > > > Time: last week of July, day to be determined, please complete foodle if > > you're interested. > > > > Cost: free but you'll have to organize your travel and hotel plans (I'll > > send suggestions later). > > > > If there is a specific algorithm that you would like to discuss, please > send > > me an email with the reference. I will put together a list of references > to > > read before the meeting. > > I hope to see you all at the end of July. > > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: